3 ms·
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
by merb 11y ago
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.
- fithisux 11y agoI 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.
- Nutomic 11y agoThat's because List is an interface, not a class. FYI this works in Scala: val j = List(1, 2, 3)
- duaneb 11y agoIt 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.
- merb 11y agoHowever 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.