4 ms·
To a large extent C# is basically Java 2.0, what you might build if you were starting a broadly similar language/runtime project after watching a few years of t
by _delirium 12y ago
To a large extent C# is basically Java 2.0, what you might build if you were starting a broadly similar language/runtime project after watching a few years of the first one (the initial release was about 5 years later, 2000 vs. 1995). The language is pretty nice imo, and I'd choose it over Java. But the runtime situation is somewhat worse if you need cross-platform support— the JVM is better than Mono overall. So I'd pick C# over Java iff you can use the official Microsoft runtime, i.e. you don't need cross-platform or open-source.
- edwinnathaniel 12y agoUnfortunately JVM is better than CLR in terms of feature set and performance.
- taspeotis 12y agoMicrosoft is making inroads performance wise (and have been for a while). RyuJIT seems to deliver a nice, practical boost to performance. .NET Native lets you sidestep (with several caveats) the JIT and start executing your code much more quickly. And every other major release they seem to tune the GC to be harder/better/faster/stronger etc.
- pjmlp 12y agoOnly when you forget about: - tail call optimization - AOT compilation as part of the standard toolchain. No need to rely on third party vendors - value types - reifeid generics - painless FFI with external code EDIT: - Forgot about direct control over SIMD instructions. All of those issues are being discussed for Java 9+ and have corresponding projects at OpenJDK.
- CmonDev 12y agoAlso two very well supported versions of VM with distinct advantages: 1) Mono - deploy to every major mobile platform using a well-defined single-vendor pipeline. 2) .NET - unmatched performance on Windows.
- edwinnathaniel 12y agoThere are different JVM implementations too y'know :) http://www.azulsystems.com/ http://www.azulsystems.com/
- pkinsky 12y agoScala has value types & (limited to same-method recursion) tail call optimization.
- pjmlp 12y agoScala value types and tail call optimization are just workarounds. Since they aren't visible at the JIT level, there isn't any guarantee that optimized assembly code will be generated. Additionally, it is very dependent on which JVM it gets to be executed.
- edwinnathaniel 12y agoTo do this (http://stackoverflow.com/a/1072522 http://stackoverflow.com/a/1072522) is still painful in .NET compare to Java.
- CmonDev 12y agoJVM runs faster on some minor consumer platforms such as Linux, but that is pretty much it.
- deleted 12y ago[deleted]