FWIW there have been methods added to the Math class that perform math operations on unsigned integers, allowing a Java int to be treated as an unsigned int (cf long). In addition there have been other libraries such as JFFR and JNA that make it more sane to inter operate with C libraries in a much less painful way. There's even a future enhancement request to add this info a future release of Java.
Yea, I wouldn't read my above list as a list of roadblocks. The JVM is a serious work horse and every year the list of complaints I have shrinks. Go certainly has its own problems as well, and the performance profiles that pain java are probably not going to fare much better under Go. The major win is probably goroutines.
Re:Go 1.6 is Released
by kasey_junk on Wednesday February 17, 2016 @06:56PM
(#11122583)
It's not even goroutines. Its the scheduler. I am continuously impressed by the amount of quasi-generic performance they can get out of something so simple. You can understand the entirety of the golang scheduler in minutes, and it works out of the box for most of my golang use cases.
That said, the JVM scheduling is pluggable, so I have options for a much bigger variety of use cases. With go if the default scheduler doesn't do what I want, I'm stuck.
Actually JNA is actually way better than Go or JNI.
And if you are looking at Kotlin / Scala you won't find yourself inside the object-oriented pain. The JVM is actually not that bad.
I agree with you. But this code, does not compile
List<Integer>[] j=new List<Integer>[10];
and this is a a serious problem. If generics are correctly implemented, then it should compile.
That's because List is an interface, not a class. FYI this works in Scala:
val j = List(1, 2, 3)
It doesn't work for all scala interfaces, and when it is like that, it's often frustrating to find the underlying implementation.
But that's beside the point—OP was pointing out that you can't have generic allocation.
However there are mostly alternatives for Java8 something like that: Collections.singletonList(1, 2, 3) which actually gives a List<Int> by the end it all comes down to syntactic sugar.
Re:Go 1.6 is Released
by Manishearth on Wednesday February 17, 2016 @11:19PM
(#11123695)
Finally, the object-oriented nature of the JVM is sometimes a pain. This can be worked around, but there is something to be said for preferring the typing of Go.