7 ms·
Javascript is dreadfull , and its flaws are counter productive and intolerable. It has good things like closures and first class functions , and that's it. Most
by camus 14y ago
Javascript is dreadfull , and its flaws are counter productive
and intolerable. It has good things like closures and first class functions , and that's it. Most of js developpers hate javascript , but are forced to work with it. So they dont care what they use as client language provided it gets the job done. few people cares about Javascript. most of the devs hate it. But the browser as dev plateform is a fact.
- kofman 14y agoAgreed, it's a terrible language. Among other things, it makes it way too easy to write code which many people will read as being correct, but will actually be subtly incorrect. A few of the weakest parts: - for (var x in y) when used for array iteration or even dict iteration; hasOwnProperty? Really? - x[obj] = y; seriously, did i really want '[Object object]' as my key? - the choice of function level scope over block level scope
- Xcelerate 14y agoI'm not sure function level scope over block level is a bad thing. It makes it more Lisp-y. And if you want block level scope, it's about as easy as (in CoffeeScript): do -> ... local variables right here ...
- munificent 14y ago> I'm not sure function level scope over block level is a bad thing. It makes it more Lisp-y. Lisp has block scope.
- kofman 14y agoIt might be nice to make a canonical list of things which suck about JavaScript. https://hackpad.com/spTEgxqvFYj#Things-That-Suck-About-JavaScript https://hackpad.com/spTEgxqvFYj#Things-That-Suck-About-JavaS...
- msteigerwalt 14y agoFrom my experience, "most" of those JavaScript developers who "hate JavaScript" are in fact front-end developers who hate writing JavaScript for websites, since they struggle daily with issues such as cross-browser compatibility and inconsistent DOM implementations, which have nothing to do with JavaScript at all, and can't be fixed by a different syntax. It's also compounded because the majority of front-end developers write their code procedurally for each application component, which creates a terrible nest of repetitive and error-prone code. They feel the pain, don't know how to solve it, so switch to a different syntax, blaming that as the root cause of the problem. But feeling enough pain to viscerally HATE a language, as many front-end developers do, is not something that can simply come from the syntax of the language and the fact that the equality operator does type conversion and whatever small list of gripes users have. Most other languages (including CoffeeScript!) have a similarly-sized set of flaws and aren't nearly as derided.
- Me1000 14y agoCorrelation not causation. As someone who has built large scale JavaScript applications, and has a lot of experience in other languages I really don't like JavaScript. My experience is that a lot of people know JavaScript, but very few people actually like it... Those people generally make writing JavaScript their day job. Overall, cross browser js isn't really that difficult anymore and I rarely see people complaining about that. Of course, I've been part of the AltJS community for a while, and the people I follow closely are not front end developers.
- thedufer 14y agoThat is a sweeping condemnation of JavaScript that I've honestly never heard support for. JavaScript has quirks that people don't like, but it can be rather enjoyable to work with.
- SoftwareMaven 14y agoIt sounds like a condemnation coming from 1998, when doing anything in the browser was painful and that was the only place JavaScript existed. I hated JavaScript in those days, too, but today is a very different world.
- niggler 14y agoI've only started playing with it recently, but I've been doing some heavy stuff and wonder whether the criticism stems from deficiencies in the language (for which there are workarounds within the language) or a fundamental lack of understanding of the javascript model.
- jonknee 14y ago> Most of js developpers hate javascript I don't know of any JS developers that hate JS. I know a lot that hate some browser implementations of JS though.
- snortblt 14y agoI'll second that. I use it yet avoid it when possible. It's downright clunky compared to many scripting languages. Not completely broken, but broken enough.
- georgemcbay 14y agoI've done quite a lot of JavaScript development, enough that I guess I'm a "JavaScript developer" (though thankfully that isn't my current day to day job) and I hate it. So now you know of at least one. I agree with everything camus said. Yes JavaScript has some cool stuff in it, but taken as a whole it is a pretty shitty language. This has less to do with the creation of JavaScript than it does the practical reality that JavaScript cannot really be changed in fundamental ways without immense amounts of politics. Pretty much the entire time JavaScript has existed it was due to be fixed in a couple of years, but then political fiasco after political fiasco (eg. EcmaScript 4) delays this. JavaScript as you can use it today sucks pretty much as much as it always has, and is only tolerable now because there are some good libraries that hide the shittiness of the language from you. Wouldn't it be better to have a web language without such a shitty core, that didn't require 100k libraries to hide you from the terrible bits?
- jonknee 14y agoWhat are the problems with Javascript you speak of? The libraries hiding you from terrible bits, at least the ones I use, have to do with the DOM and not with Javascript.
- georgemcbay 14y agoVariable scoping, unavoidable global namespace pollution, === vs == insanity, etc.
- lowboy 14y agoPlease don't speak for javascript developers without some substantiation of your opinions.
- pacomerh 14y agoNah, you're generalizing. I know many JS developers and they all love Javascript in one way or another.
- snortblt 14y agoIs that not generalizing as well? I'm one that doesn't. But then, you probably don't know me.
- lowboy 14y agoCritical difference is that pacomerh is speaking about the JS developers s/he knows while Camus had no such qualification.
- pacomerh 14y agoYeah, "I know many" refers to a group of people I know, so I'm not generalizing. It's like that silly quote from the Anchorman '60 percent of the time, it works every time'.
- PommeDeTerre 14y agoOf these developers, how many of them have any real experience with languages like C++, Java, C#, Scheme, Haskell and Erlang? It's easy to find JavaScript developers who love JavaScript solely because it's the only language they know. But once you start dealing with JavaScript developers who have a wider understanding of what various programming languages offer, the problems with JavaScript become much more obvious, and the hatred for JavaScript becomes immense.
- marshray 14y agoI think Anders Hejlsberg knows a few other languages.
- PommeDeTerre 14y agoYes, indeed. That's why we're finally seeing some sensibility being brought to JavaScript. He's bringing in basic features and functionality that should have been included 17 years ago, back when JavaScript was first developed.
- jfoutz 14y agoWith a name like Camus, how can you not be a fan of javascript?
- medikoo 14y agoJavaScript is my main language since about 5 years, and I love it. I know a lot JavaScript developers and honestly I don't know any that "hate" the language, about 80% are very passionate about it, for rest is just tool to achieve the goals. JavaScript has minor flaws but in general when understood it's outstanding. However it's not the style that you've been taught in school (OOP) and that's the problem for many newcomers. It looks that you're just frustrated with something and want whole world to be as well, it won't work. Try CoffeeScript, it's much more approachable when coming from OOP world, then when you get how JavaScript works and understand it makes sense, you'll be ready to program in it directly.