News for hackers. Stuff that matters.
Re:Go 1.6 is Released by duaneb on Wednesday February 17, 2016 @05:33PM (#11122074)
Green threads are awkward to express with the JVM threading/memory/io model. The runtime is massive (contrasting to the go model of statically linking deployment binaries). Some semantics (such as unsigned 64-bit integers) are difficult to express. Java's JNI is a PITA. I don't believe go's c bindings are much better, but the JVM definitely has its sore points.

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.

Re:Go 1.6 is Released by alblue on Wednesday February 17, 2016 @06:18PM (#11122360)
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.
Re:Go 1.6 is Released by duaneb on Wednesday February 17, 2016 @06:29PM (#11122427)
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.

Re:Go 1.6 is Released by merb on Thursday February 18, 2016 @03:20AM (#11124419)
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.
Re:Go 1.6 is Released by fithisux on Thursday February 18, 2016 @03:59AM (#11124523)
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.

Re:Go 1.6 is Released by Nutomic on Thursday February 18, 2016 @06:35PM (#11130295)
That's because List is an interface, not a class. FYI this works in Scala:

val j = List(1, 2, 3)

Re:Go 1.6 is Released by duaneb on Friday February 19, 2016 @02:41AM (#11132208)
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.

Re:Go 1.6 is Released by merb on Friday February 19, 2016 @08:36AM (#11133340)
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)