Posts Tagged ‘Programming Languages’

From nand to tetris

This looks like a great course+book: The elements of computing systems.

Rob Pike on concurrency

September 18, 2007 Leave a comment

Watch this great Google talk with Rob Pike. He talks about concurrent processes and message passing in the context of Newsqueak – a programming language that he wrote 20 years ago. What he describes is very similar to the Erlang programming model except that channels are first class citizens.

Exceptions – checked or not?

The Java Posse #127 podcast talks about the possibility of removing checked exceptions from the Java language. The JavaPosse folks seem to universally like them. No one knew what Scala did with respect to checked exceptions. Turns out that it does not have them!

3.3. Why are there no throws annotations on methods, unlike in Java?

Compile-time checking of exceptions sounds good in theory, but in practice has not worked well. Programmers tend to write catch clauses that catch too many exceptions, thus swallowing exceptions and decreasing reliability.

If you haven’t seen the Scala language yet, check Martin Odersky’s Google Techtalk.

I tend to avoid checked exceptions. This is the way that the Spring folks have gone and – of course – Anders Hejlsberg. Anders did a great job designing the C# language.

I’m still digging into an article on dev2dev which promotes checked exceptions and points out that that the times they get annoying is where the Java API was poorly designed. For me this still points that checked exceptions are a experimental language feature perhaps best left out of industry programming languages for now.

Typecase for Java

I was just reading Stephen Colebourne’s blog. He is the other of Joda-Time which looks to be a useful replacement for java.util.Calendar and java.util.DateTime… but I digress.

I was digging into the blog and found an entry about adding autocasts to Java by reusing the instanceof “syntax”. I quite like the proposed “syntax” (which is really nothing, the compiler just detects were you are using instanceof already). The consensus in the blog comments is that there’s a problem with the syntax because the variable can be assigned to. However that can be fixed by mearly disallowing assignment to the variable inside the instanceof block. All that said, it is much cleaner to use a special syntax like typecase to do this which introduces a variable binding. In this way, the expression need not just be a variables but could be a full expression – perhaps a method call e.g. the problem is shown by “if (fred.getBar() instanceof FooBar) {“.

Of course, this has been done before with the typecase expression like in Modula-3. Modula-3 is a very cool but dead language, a prerunner to Java with a more Modula/Pascal syntax. Check out the language spec for typecase. Unfortunately the original Modula-3 site, SRC, is down, perhaps try SRC later or Google’s cache of the original typecase page.

Programming Language Inventor or Serial Killer?

April 23, 2006 Leave a comment
Categories: Programming Tags: , , ,

When can I get a fix of language goodness?

February 1, 2006 Leave a comment

After reading a recent paper by Erik Meijer and Peter Drayton I am convinced that I’ll be programming in C# or one of it’s descendents sooner rather than later in order to get my fix of language goodness.

The paper is “Static Typing Where Possible, Dynamic Typing When Needed: The End of the Cold War Between Programming Languages“. I think of this as “How to have your cake and eat it too” for the programming language community :). I really loved the paper. My eyes glazed over at one or two type equations but perhaps I’ll get back to those :). It’s a laundry list of cool language features most of which I would want in my favorite language and others that I’d like to tweak a little bit probably.

I loved the rant on XML: “XML is a prime example of retarded innovation”. I really hate how people love XML. NoXML. Ok? They even mention that it’d be better to use something akin to CORBA style IDL for interplanguage communication between the CLR and JVM worlds using a binary wire format. But let’s not leave out scripting languages like Perl, Python and Ruby. Perhaps something like Joe Armstrong’s Universal Binary Format – UDF – is worth considering in this space. Hessian is another reasonable looking solution to this (even if it does seem to fall on the “Java rulez” side of things).

… more to come on this post

Better *is* better and worse is worse

January 10, 2006 Leave a comment

I’ve read the original Worse Is Better article by Richard Gabriel a couple of times now. I discovered it via my interest in programming languages (Lisp in this case).

Jim Waldo reminds us that Better really is *better* in Artima article Worse is worse.


Get every new post delivered to your Inbox.