5 ms·
Only 14 years after it introduced with version 1.0 of C#. Java moves really slowly these days. Java lost a lot of credibility in the 3D visualization market i
by bhouston 13y ago
Only 14 years after it introduced with version 1.0 of C#. Java moves really slowly these days. Java lost a lot of credibility in the 3D visualization market in part because it is crazy inefficient to do 3D without value types. C# did very well there with the XNA tool did in part because it had value types and Java didn't.
I wouldn't have moved from Java to C# for desktop apps back in 2001 if Java had stated they would have adopted value types quickly, but they didn't.
History has moved on though and Java isn't really used for desktop apps at all now so this is a moot point. (And C# is on its last legs as well as a desktop development tool, except in large organizations...)
Downvoted to -1 for stating a fact. That has never happened before. Edit again, seems I've been upvoted again. Rollercoaster ride today.
- dllthomas 13y agoThe way language works, "stating a fact" is rarely just stating a fact. Pragmatics is interesting.
- IsTom 13y ago"These days"? Really?
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- spicyj 13y ago> And C# is on its last legs as well as a desktop development tool, except in large organizations... What's used instead?
- daigoba66 13y agoIt probably depends on the market and use case. I suspect LOB software is mostly web based these days (easier to deploy, upgrade, and maintain). A lot of desktop software is still written in C/C++ for Win32. Although Microsoft would probably love it if developers starting coding to WinRT which, I think, works best with C#.
- pjmlp 13y agoAnd yet we get consulting projects to port stuff from MFC/C++ into WPF/C#.
- bhouston 13y agoWe went back to C++ because C# just isn't supported on Linux well, and Windows is losing its once dominant position. If C# worked on iOS and Linux equivalently to Windows, then I probably would have stuck with it. But now I do JavaScript + WebGL (which is admittedly slower than both C#, Java and C++): http://clara.io http://clara.io
- TheAnimus 13y ago>If C# worked on iOS and Linux https://xamarin.com/ https://xamarin.com/ imho a much better alternative to C++. I really like C# as a language, it's got that general purpose excellence, but when you get on with things like LINQ,Rx,TPL it's very hard to go back to a language without such first class citizen frameworks.
- smrtinsert 13y agoI guess JavaScript moves pretty slow these days.
- bhouston 13y agoJavaScript moves really fast these days. Faster JITs, NodeJS, Asm.js, wide support for WebGL, WebCL on the horizon... The only real downsides are scaling issues that npm is running into, the fact that Google moved much of its V8 team to Dart, and no WebGL on iOS.
- _random_ 13y agoThe purpose of Asm.js is to only touch JS with a 10-feet pole. Node.js is just an implementation of the Reactor pattern with some package management. Google are smart people, they understand that dynamic weakly typed language is a dead end, hence Dart for client and Go for server.
- bhaak 13y agoThe JavaScript engines move really fast but not the language itself.
- reallyuthink 13y agoMaybe you were downvoted for leaving a comment that had fuck-all to do with the topic? Maybe people just don't want to go in for yet another round of Java bashing?
- pjc50 13y agoLarge orgs developing apps for internal use are pretty much the only people doing non-game desktop apps these days. They're still happy with it as an inheritor of Visual Basic, and if you're happy to be Windows-only it works very well. I agree that Microsoft abandoning XNA development was a very disappointing decision, it was a pretty good tool.
- dang 13y agoI'm marking this subthread as off-topic. Besides being mostly off-topic (not entirely, since it does talk about value types), this comment is arguably a middlebrow dismissal, since it dissmises a serious piece of work without engaging anything interesting in it, and for a superficial reason. That reason (Java moves slowly) may be valid or may not be, but it isn't interesting in the HN sense of the word, because the route from the article to there is entirely predictable. Such comments get upvoted because they elicit the pleasure of recognition ("I've noticed Java moves slowly too!" or worse, "Yeah, Java sucks!"), and that is a reflex reaction, not a thoughtful one. We all do it—but if we're to have reflective discussions instead of reflexive ones, we need to inhibit it. The larger problem here, though, is the dreadful subthread the comment spawned. HN threads are sensitive to initial conditions, and middlebrow dismissals lead to lowbrow rejoinders. It's the online comments equivalent of "B players hire C players". All: please re-read what you're posting and reflect on it. If it goes on a tangent, make sure that tangent is not a predictable one. But if there aren't many comments in the thread, try not to go on a tangent at all—sensitivity to initial conditions means it may well derail the discussion.
- scott_s 13y agoI do want to point out that bhouston does have a nugget of useful insight in his post: Java lost a lot of credibility in the 3D visualization market in part because it is crazy inefficient to do 3D without value types. C# did very well there with the XNA tool did in part because it had value types and Java didn’t. That's a very interesting point: the lack of this very feature closed Java off from an entire field. That implies that if this feature is implemented, it could open up that field to Java. (And, presumably, others with similar requirements.) I wish that bhouston had expanded on that subject. This, I think, can make the difference between a middlebrow dismissal and an insightful contribution. Instead of framing a comment in terms of what is wrong, frame it in terms of "what would this enable"? You can still make the same fundamental points ("Java lost 3D visualization because it lacked this feature"), but the ensuing discussion can be very different. The post changes from a dismissal to the start of a discussion.
- dang 13y ago
- bad_user 13y ago> Only 14 years after it introduced with version 1.0 of C# After 14 years since C# was introduced, it still doesn't do escape analysis: http://docs.oracle.com/javase/7/docs/technotes/guides/vm/performance-enhancements-7.html#escapeAnalysis http://docs.oracle.com/javase/7/docs/technotes/guides/vm/per...
- Locke1689 13y agoI've played around with it. It doesn't seem like a huge perf boost and would require a lot of dev work -- people who want value semantics use value types and the CLR can do better analysis then we can (e.g., across assemblies).
- bad_user 13y agoI think on the JVM's escape analysis was originally introduced to get rid of intrinsic locks, a task it does really well - something which I can say after countless of benchmarks I made trying out different synchronization strategies. Currently it's really hard to beat the JVM's intrinsic locks (i.e. the synchronized block), precisely because of this - because if the JVM detects that some piece of code is single-threaded, then it eliminates the lock completely. I think stack-allocated values by means of escape analysis done at runtime is just an extension of that. Also, escape analysis, theoretically at least, goes beyond what one can do with value types. For instance functional/persistent data-structures are guilty of generating a lot of short-term junk and because internally these data-structures are represented as trees, you need references for linking the nodes together. On the whole I am pleased with how well the JVM handles short term junk, whether escape analysis plays a part in it I don't know.