Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:Epic type system fail - universal covariance (Score 1) 330

I concur exactly with your null/NPE observations. The next addition I want to the Java spec is the ability to mark a method as never returning null.

JSR 305 defines a set of annotations that allow you to do this (including '@NonNull' for method return values).

The weakness of this is that you can formally specify a method should never return 'null' with this, but the compiler does not check whether you live up to this promise. There are tools that can do some basic checks against blatant mistakes (Eclipse does this nowadays), and tools that are a bit more advanced and find even more subtle mistakes (FindBugs comes to mind).

Really proving correctness without a doubt is an unsolved problem - even when adding additional annotations it's a tough nut to crack - check out research projects like ESC/Java if you're interested in the gory details

.

Comment Re:Some insight from one of the bigger customers.. (Score 1) 641

Stallman wrote the Java trap, and we all laughed. Sun is nice we thought, it'll be ok. We were all wrong. Stallman saw further, he saw that even if Sun was ok, if someone bought Sun, then things could get messy. Welcome to messy.

Actually, most of the platform has been open-sourced by Sun before the takeover under the 'OpenJDK' name.

Indeed, GNU now carries a 'headnote' to the article explaining the new situation: http://www.gnu.org/philosophy/java-trap.html

The situation is still messy - but not for the original reasons laid out in that article. If worst came to worst, the JVM can be forked - but forking a widely-used platform is a whole other can of worms, of course.

Slashdot Top Deals

"Protozoa are small, and bacteria are small, but viruses are smaller than the both put together."

Working...