Hacker News new | ask | show | jobs
by x0x0 4153 days ago
As a java programmer, who is involved in some large projects that can't be ported, I'm really jealous. And eagerly waiting to see how well the .net core runtime targets linux and mac.

Good, no copy interop with native code would also be awesome. Particularly for machine learning.

1 comments

The Java world moves on too, you know. A lot of the features that are listed as things that would be nice to have in C# already exist in Kotlin, which has been created by JetBrains to be fully drop-in compatible with Java. To the extent that it has a hotkey that automatically rewrites a Java class into Kotlin, and the entire project keeps compiling and working (they have full/close to perfect interop).

For example, Kotlin has:

• Nullability in the type system

• Good support for efficient functional programming, e.g. you can do collection.map { it * 2 } and it's as fast as an imperative for loop as the compiler inlines the block.

• Strong support for meta-programming / DSL features, so there's less need to make code generators. JetBrains are still working on this but basically the language has a lot of features that don't initially seem all that significant, but can be combined to create useful DSLs.

• Lightweight data classes that support immutability and editing via copy construction (using named arguments)

• Traits

• Delegation

• etc etc

... and it's all here today, with good IDE support, and compatible with Java 6 even.

For good native interop there is JNA and there's a research project over at Oracle looking at how to do something better than JNA directly integrated with the JVM in a future version. So don't be too jealous.

There is a big difference between being the platform's system programming language and a third party language.

Specially in the eyes of managers.

I wish they kept the Pattern Matching support.