I am reading Stephen Colebourne's
JDK 7 language changes - Devoxx votes!.
At the devoxx conference people voted on possible future features of the Java language.
As a developer with a .NET background, I can't help to compare with C# ...
Properties: In C# since 1.0
Null handling: In C# 2.0 with nullable types and according operators
List/Map syntax: In C# since 1.0 with Indexers
Extension methods: In C# since 3.0. See here, but C# is going much further with LINQ
Method pointers: In C# since 1.0 with delegates. Later extended with anonymous delegates and Lambda Expressions
Multiline Strings: In C# since 1.0 with the @-syntax
Infer generics: In C# since 3.0 with general type inference
... go go Java! C# is not resting ... 4.0 is in the pipes, offering another truckload of innovation (dynamic capabilities, co-contravariant features for generics, optional parameters
(small thumbs up for Java) and named parameters ...)
Update: The post is
discussed at Hacker News.
C#'s nullable types are only for value types. The discussions regarding Java are wider.
ReplyDeleteHow are optional parameters a thumbs up for Java? It doesn't have them.
Language is one thing but jvm ecosystem is another thing.
ReplyDeleteHonestly for enterprise grade libraries and framework (caching, transaction, persistence, dependancies injection,...) the jvm ecosystem is way above .net.
As for the language, java is like cobol, usable and understandable for the mass.
Use Groovy or Scala or Clojure for advanced concepts.
By the way I would be curious to know how many developers would really use the advanced features of C# 3.0 or 4.0, honestly...
@Ricky
ReplyDeleteYou are right, I was confusing varargs with optinal parameters.
Java supports varargs, but so does C#...
@Anonymous
Seperating language from platform is certainly important. Personally I don't think Java is that much above .Net. The ecosystem around .Net has grown incredibly fast ... see also the discussion on Hacker News