5 ms·
No language/technology/thing is better than another. It may be better than another in a particular context. I don't really buy into this reasoning. If a given
by PommeDeTerre 14y ago
No language/technology/thing is better than another. It may be better than another in a particular context.
I don't really buy into this reasoning. If a given language is worse than every other in almost every context (the "global" context, if you will), then it's clearly an inferior language relative to the others.
JavaScript does exhibit this. It has exactly one thing going for it: it's the only scripting language widely available in web browsers.
Aside from that, it's inferior to most other languages in almost every respect. Its syntax is mediocre. Its semantics are inconsistent and often outright confusing. It's missing critical features that are essential for anything but the smallest-scale development. Its performance is only just somewhat poor today, due to a huge amount of effort from Google and others, otherwise it was downright abysmal in its early implementations. Its libraries are more bandages for its numerous problems, rather than tools that empower developers. The supporting tooling is quite bad (Chrome's developer tools or Firebug don't compare to a real debugger, for instance). The community leaves a lot to be desired, especially given the high amount of ignorance and the extremely bad "advice" that is passed around so often by its members.
We shouldn't be politically correct when it comes to technology. Some programming languages are worse than others, and we shouldn't shy away from saying this. JavaScript is an inferior language, like it or not.
- rohern 14y agoHear, hear! It has exactly one thing going for it: it's the only scripting language widely available in web browsers. Please let us change this. We are marching into the future heady with ambition and the common tool is JavaScript. This is a sad state of affairs.
- MJR 14y agoIt's missing critical features that are essential for anything but the smallest-scale development. What in your opinion is smallest-scale development? Millions of users using your application each year? Do we need web apps to support billions of users each year now? JavaScript is the most superior scripting language widely available in web browsers. Until there is an alternative it cannot be an inferior language because there is nothing equivalent on which to base a comparison.
- FourthProtocol 14y agoThank you, you put it better than I was able to!
- PommeDeTerre 14y agoI was talking about code base and application size, not so much the number of users. Using JavaScript for a large application is not a pleasant experience. I know there are a lot of JavaScript developers out there who have never used anything but JavaScript, and maybe PHP, so they don't know what they're missing. But those of us who have used even just C++, Java, C#, or Delphi will know how critical things like static typing, namespaces, proper modularity and class-based OO, for example, are.
- FourthProtocol 14y agoAside from that, it's inferior to most other languages in almost every respect. Your perspective is semantic. Mine is pragmatic. I want to get a job done, and I want to be successful. I have no interest in the best tool. If I'm targeting web browsers then JavaScript is the logical choice that will make me successful. It doesn't matter that it's a swamp donkey. JS libraries are like any other library. The developer makes the choice. I wouldn't, for instance, distribute the Windows Phone toolkit with my app when all I'm using from the toolkit is the ExpanderView control.
- Joeri 14y ago> JavaScript does exhibit this. It has exactly one thing going for it: it's the only scripting language widely available in web browsers. Other things it has going for it: - a proper universal unicode-aware string type. Languages which lack this: C, PHP. (Note that i said universal, obviously you can do proper string handling in any language, some just make it a bit too hard.) - low verbosity and a general lack of boilerplate. Languages which lack this: Java, C++. (Yes, you can write concise code in these languages, it's just that in practice nobody does.) - Prototypal inheritance. Admittedy, many people consider this a disadvantage, but that's because they were introduced to the inferior classical inheritance model first. - Everything is an object, always. Languages which lack this: practically every mainstream language out there. Combine this with prototypal inheritance, and it makes javascript the most object-oriented language i know by letting you inherit from almost anything. - A syntax so expressive it can be easily adapted to do dynamic scoping and namespacing (see crockford's book) without actually needing a namespace syntactical element, which makes it possible to scale it up to hundreds of thousands of lines of code. (The DOM is a different matter, but a different language would feel the pain of scaling that up just as much.) So, really, worse is in the eye of the beholder. Javascript is different, not worse. Are you sure you've given it a fair chance and aren't just rejecting it for weak typing and the horribleness that is the DOM? (Btw, you should try a proper IDE like webstorm that has a full debugger for javascript before saying the tooling isn't there yet.)
- glenjamin 14y agoJavaScript is the only mainstream programming language that has multiple competing production-quality implementations. I think this rarity helps to ensure that work is done to improve the runtime, from both an ease-of-development and a performance perspective, while also keeping the set of what works pretty stable.
- jbigelow76 14y agoI'd say Mono/Xamarin and .NET/Microsoft would qualify as competing production quality implementations of C#. Xamarin may have positioned their implementation of C# to target the mobile space instead of the enterprise space because they see that as a losing battle against Microsoft (and the niche they do address is very lucrative right now) but the could still qualify as competitors.
- PommeDeTerre 14y agoThat's nonsense. There are numerous competing, production-quality, independently-developed C compilers, runtimes and standard libraries. There are numerous competing, production-quality, independently-developed C++ compilers, runtimes and standard libraries. There are several competing, production-quality, independently-developed Ada compiler systems. There are numerous competing, production-quality, independently-developed Fortran compiler systems. JavaScript is hardly alone in that respect.
- glenjamin 14y agoAh, I think when I usually make that claim I include the qualifier "high-level". Obviously, without that qualifier the statement is false.
- jeswin 14y agoIts syntax is mediocre. I would agree if you said language X is more expressive than Y, it can be proved. But isn't syntax totally subjective? Missing critical features Which critical features are missing? Performance .. absymal Well .. you would not notice any performance issues with typical web apps. You should try it. Libraries are missing, are more bandages for its numerous problems Github has an enormous collection of nodejs libraries. Which ones are bandages for language problems? Tooling I find text-editors and chrome better than IDEs like Eclipse and Visual Studio.