Originally Posted by 3930K
Java: more spyware.
They (at least C#) bring a little of everything. OOP, functional programming, unmanaged code calling, website/desktop/mobile support... You can pretty much write everything that doesn't need specialized
OOP features, or specialized
functional features, etc. or the extra 0.01% of performance in it. The JIT optimizing + compiling everything makes it easy to share stuff across different architectures.
Also, you like JS
but you don't like C#? Hell, I'd rather program in Python than in JS. (I don't like Python because of its goddamn whitespace. If
from __future__ import braces
actually worked, then I'd like it a LOT more).
Where to start (there's so many lines of discussion).
I guess I'll start by stating that MS thought the world wide web was a passing fad (in all honesty, most big corporations did around the turn of the millennium). After they beat Netscape, they pulled almost all their resources away from IE (why we were stuck with IE6 for so long) to work on the replacement, application-centric system that was set to take over. Microsoft's bid was .NET and C# was their redesign of Java created to prevent the "write once, run everywhere" Java offered from risking the Windows monopoly. Over the years, C# has changed, but it's core is still based on most of Java's ideas. For this reason, your (seeming) distaste for Java is interesting.
A discussion of the language C# and the VM on which it runs are two separate things (for example, ironpython). Let's start with the VM. The first problem is that MS's VM only runs on windows. Mono is fairly problematic and significantly lags MS's VM leading to situations where the code can't run across different machines even if the code is basic. On the topic of different machines, there are two problems with this pipedream. The first is the idea that changing architectures is "free". Someone must recode large parts of the VM to make the code run and the VM must be maintained at a not insignificant expense. The second problem is that "write once, run everywhere" only works if the external calls don't change. If the VM must act as a buffer to translate OS calls, then even MORE maintenance is needed as different VM's must be made for each OS and each architecture (we're already talking about dozens of permutations just to support the 5-6 most popular CPU architectures and OS's). With these expenses being similar to those of a cross-platform (and cross-architecture) library such as Qt, the case for a VM decreases significantly (and these problems exist without even considering performance which greatly favors compiled languages).
The language of C# is amazingly bland. If we compare it to C, then it adds garbage collection, strong typing, Java-like OOP, and some functional ideas (a quick note about it's functional ideas: F# makes a much stronger case), but we lose performance (the difference is more than a little). If we compare it to D, we get almost nothing except a VM (whatever that's worth, which as discussed probably isn't much), and we once again lose performance. If we compare to common Lisp/shen/scheme, we lose in every way. In fact, there's a couple lisp implementations that target the .NET VM.
I should have probably spent a little more time on my JS comment. JS is used everywhere. PDF, websites, server scripting, flash, E4X (JS for XML), Qt, webapps (quickly becoming "the thing") and a bunch of other places. As such, it fits into my used-a-lot language list. When I first started learning the language, I had nothing but abhorrence. Hearing a few lectures by Crockford made me rethink my view of it. He was correct; if you throw out the Java-like syntax and learn to deal with or avoid all the problems, it isn't terrible to develop with. I suppose the only real "like" that I have for it is that it is the only mainstream functional programming language (while being perhaps the most used language in the world). I just don't particularly "hate" JS anymore.
My only question about JS is why it hasn't been replaced with real scheme. Shen lisp with prototype inheritance would be faster, smaller, easier to program and understand while allowing things like integers, real arrays, and even optional static typing (in fact, shen has the only turing-complete type system). M-expressions could potentially offer a syntax very close to C (McCarthy originally intended lisp to use M-expressions to act like Fortran, but programers who use lisp just prefer S-expressions) while still functioning with S-expression code. Additionally, Shen currently has a version that's implemented in JS which means that older browsers could run Shen code for backwards compatibility while newer browsers could simply freeze currrent JS implementation development to ensure old sites continue to work as expected.