Tag Archives: NullPointerException

The Dark Path?

It always pays to listen to Uncle Bob Martin. He’s clearly someone who’s got something to say. But that doesn’t mean I always agree. Today, I don’t. And I consider it interesting why we disagree.

I’ve just read Robert Martin’s post“The Dark Path”. He picks three innovative traits of Kotlin and Swift: strict null checks, strict exception handling and making classes final (in Java speech) or closed (in Kotlin lingo) by default. It’s an interesting post I recommend to read. Uncle Bob shortly explains these features, continues with complaining about languages becoming too complex because they try to fill each leak of their predecessor languages, and closes with an ardent call to write tests. Like usual, he arguments very convincingly. It’s hard to disagree after reading the article. Yet I do.
Continue reading

Ceylon’s Approach To Eliminate NullPointerExceptions

Maybe you’ve already heard of Ceylon. Ceylon’s a language initiated by Gavin King, the creator of both Hibernate and Seam. Putting it in a nutshell, Ceylon is an attempt to create a better version of Java.

The Ceylon developer team has released an early preview version (milestone 5). Andrew C. Oliver considered it to be mature enough to have a first look at it (see his article at Infoworld.com).

A very nice feature of Ceylon is the approach to NullPointerExceptions. This kind of mistakes is a real plague of the Java world. Usually they are caused by programmers who forgot to implement the “nasty case”. This is why I baptized the NullPointerException a NotImplementedYetException in an earlier article. Ceylon eliminates NullPointerExceptions completely.
Continue reading