3 ms·
Well, Java caught up somewhat with version 8: with lambdas and Streams to provide LINQ-like functionality - which, however, isn't equally good imho, and not ext
by V-2 12y ago
Well, Java caught up somewhat with version 8: with lambdas and Streams to provide LINQ-like functionality - which, however, isn't equally good imho, and not extendable because it's not based on extension methods. And unfortunately I have no access to these goodies anyway, as an Android dev :/
Ah, and then there's still the inferior, type erasure based generics. There is nothing on par with C#'s awesome async-await. There's no yield return semantics (when used properly, you can create very clean and robust code thanks to it). You've got to deal with the infamous checked exceptions (I think it's the consensus these days that this wasn't such a good design choice after all). No single-root type system (so you've got Integers and ints, and the latter aren't objects) etc. And there's more, even little things like var keyword or partial classes that don't exist in Java (like many language features, partial classes can be used for evil, but it's very helpful for dealing with autogenerated code). Operator overloading. Nasty and weird syntax for annotations (in compare to C#'s attributes).
Some of these can be a matter of taste for sure and I'm not interested in language flamewars :) I write both Java and C# for living, just personally I prefer the latter.
It would be real big if Microsoft purchased Xamarin and made it free (or much cheaper). They've really gained momentum in recent time and it feels like they are getting recognition from MS now.
- brusch64 12y agocoming back to Java, after some years of programming C# I have the same feeling. C# feels like Java done right. Many of Java's shortcomings can be masked with a great IDE (making setters and getters) nobrainers - but I prefer C#.
- dserodio 12y agoExcept for pass-by-value and pass-by-reference. Java's model of always passing a reference value makes the mental model around references so much simpler.
- brusch64 12y agoIt makes the model simpler, but I found this pretty cumbersome. I wanted to write a method returning two values (Boolean), so I had to return an array of Booleans. Out parameter seem easier for me (and more concise)
- jghn 12y agoI thought scala was java done right ;)
- V-2 12y agoWell - both, kind of :) Take a look at this presentation: http://www.slideshare.net/omervk/scala-for-c-developers http://www.slideshare.net/omervk/scala-for-c-developers It draws some parallels between C# and Scala.