News for hackers. Stuff that matters.
Re:C# is now a better language than Java by solutionyogi on Friday July 31, 2009 @12:37PM (#734752)
Interesting. I don't think it's right to discount the CLR and focus on the language whereas the fact is that C# can not do certain things without support from CLR. [In fact, for each C# feature, I like to know whether it's a compiler trick or CLR feature.]

The biggest example I can think of is 'generics'. Java 'generics' are implemented using the compiler and JVM has no clue about them whereas CLR actually understands them and you get full reflection support for generic classes. Read this detailed article on Generics in Java vs C#:

http://www.jprl.com/Blog/archive/development/2007/Aug-31.htm...

I also like the utility of AppDomains supported by CLR.

Overall, I love .NET platform precisely because how all the modules (CLR, languages) are integrated with each other to give you a powerful tool set.

Other than JVM being portable, I don't know of a single case where JVM is superior to CLR. [Performance wise there is not a measurable difference between the two.]

Re:C# is now a better language than Java by itgoon on Friday July 31, 2009 @04:10PM (#735261)
JVM apps (at least if they are running in a container) aren't just portable across OS' (which is what I assume you meant), they are just plain portable.

In other words, I can tar up a Java appserver, copy it to another machine, untar it, and run it. No GAC, no registry, no caspol, no mysterious .dlls. It's all right there. Usually ;)

Re:C# is now a better language than Java by snprbob86 on Friday July 31, 2009 @01:47PM (#734935)
There is no reason why you can't implement a C# compiler which uses the same compiler "tricks" as Java. In fact, someone has: http://www2.mainsoft.com/content/port-net-apps-java-ee (I've never used that software and can't say if it really works as promised, but I don't see why not)

Which side of the fence the compiler/runtime fence any given feature fails on is probably more a function of (human) resource pooling on the Microsoft managed languages teams than any technical constraints.

Re:C# is now a better language than Java by solutionyogi on Friday July 31, 2009 @05:02PM (#735363)
That's COMPLETELY incorrect. I have been following blogs of CLR team and C# compiler team members and they think very hard about whether a feature needs to be a compiler feature or in the runtime itself. If they are short on manpower, they don't implement a feature rather than implementing it at the wrong level.
Re:C# is now a better language than Java by snprbob86 on Friday July 31, 2009 @06:25PM (#735546)
Since you probably haven't been following my comments here on HN: I work at Microsoft on a very C#-centric team. I have good friends on, and direct working relationships with, the managed languages teams here at Microsoft.

The "wrong level" corresponds to the goals and direction of the greater managed languages team. If the C# team wanted to implement every feature without any regard for the Visual Basic or F# team, they could. Clearly, they aren't going to do this because it creates wasted effort, inconsistency between languages, and maintainence complexity. Moreover, implementing on the wrong level has impact on performance and the developer experience.

I didn't mean to imply that they do the wrong thing because they are short on man power. On the contrary, they do the right thing because they are short on manpower.

Everything could be a compiler trick, but that doesn't mean everything should be. The managed languages teams here at Microsoft absolutely kick ass; they know what they are doing.