5 ms·
JavaScript is like working on an old Jeep. It's not very clean; it's not very efficient; you're dealing with weird nonsensical issues all the time; there's a g
by ryandvm 12y ago
JavaScript is like working on an old Jeep.
It's not very clean; it's not very efficient; you're dealing with weird nonsensical issues all the time; there's a good chance you will cut off your fingers or mash your knuckles.
But... it's incredibly common, there are a ton of writeups on whatever you're trying to do, and the barrier to entry for getting something done is so damn low that for better or worse, it's not going anywhere soon.
The only thing that's going to rescue us from JavaScript is when every browser ships with a common language-agnostic runtime (a la CLR, JVM). The JavaScript-as-a-Transpiler-Target movement has the right idea and a little bit of momentum, but I think the potential obsolescence, the hassle involved in setup and debugging, and the perceived inefficiency scare most developers away.
Imagine if you could code your web app in whatever language you wanted because they all compiled down to the same VM bytecode...
- eterm 12y agoA CLR doesn't solve much I think, if you look at .Net there's a single de-facto language (C#) and VB.NET died out just because people will gravitate toward the language which has all the help, stackoverflow answers, etc. Sure, it makes using other languages possible, but typically that'll just be seen as weird.
- raziel2p 12y agoYou can't really compare the two situations (.NET and a hypothetical browser bytecode/VM). The reason C# ended up the main .NET language is that it's a brilliantly designed language - far more than you can say about Javascript.
- ufo 12y agoI don't think its just that. Its impossible to design a "trully general" intermediate programming language so what ended up happening is that the CLR was a perfect fit for C# and a not-so-perfect fit for everything else. At least thats what I've been told by my programming languages professor.
- emodendroket 12y agoWell, there are others, but maybe the JVM is a better example, where Scala seems popular enough.
- tonyedgecombe 12y agoI think VB.NET was just tainted by Visual Basic. Back when it was released there was a lot of resistance from the VB crowd where as all the C++/MFC programmers could see a huge and immediate benefit in C#.
- trymas 12y ago+1. My collegues and I dream that one day browsers will accept some language-agnostic byte code, to which your favorite language could compile.
- nawitus 12y ago>the hassle involved in setup and debugging, and the perceived inefficiency scare most developers away. Hmm, I don't see why there should be any hassle in setup an debugging. You need tooling to do that automatically, and the tooling is almost there (although it still requires a bit of manual wiring, but it's only a question of time). Browsers already compile this .js code to run at near native speeds, and modern browsers support debugging compiled code reasonably well. There are still significant areas to improve, of course. In fact, you can treat "compile-to-JavaScript" as a form of VM "scriptcode".