3 ms·
I've heard that same argument for a long time from PHP people. Yea, these are all but tools we use for the job. But bottom line is, some tools are just worse th
by vibrunazo 14y ago
I've heard that same argument for a long time from PHP people. Yea, these are all but tools we use for the job. But bottom line is, some tools are just worse than others at pretty much any real practical use. [1] You make it sound like you've read the Javascript: The Good Parts book [2]. I've read it too, and it's a great book I recommend for anyone who must work with Javascript and have no way out of it. But keep in mind that an important premise of the book is aid those who are in this position where they can't run away from Javascript. As shown by this thread of languages that compile to it, it's often perfectly possible to dodge the shortcomings of JS by just not using it. You shouldn't torture yourself for no good reason. If you are in a position where you must work with JavaScript. Then I recommend reading this book to learn to stay away from the bad parts, as you said. But if you can work with any of the compilable languages, I highly recommend you stay away from JS as much as you can.
I would repeat the exact same argument for using SASS or LESS instead of CSS. There is no good reason to torture yourself with CSS instead of these better languages. It's very clear that there is such thing as one language that is much better than another in every practical sense.
[1] http://www.flickr.com/photos/raindrift/sets/72157629492908038/ http://www.flickr.com/photos/raindrift/sets/7215762949290803...
[2] http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742 http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockfor...
- tikhonj 14y agoHis argument wasn't that "it's just a tool for the job" but that JavaScript is actually a rather cool language. And it is. At any rate, I certainly like it more than most other "scripting" languages, except maybe for Lua. I would never suggest using most of the languages on that list over JavaScript. In fact, the only ones I recommend are Lisp, Ocaml and Haskell. Maybe something like Ur/Web as well. Coffeescript is good too, but it's basically lightly improved JavaScript. I find JavaScript simpler, more expressive and generally nicer than most of the other languages listed (ignoring the ones I've never seen or used). Ultimately, JavaScript is a nice language with some warts. But, for whatever reason, the warts are blown out of proportion compared to other languages--in my experience (out of the languages I've used significantly) Python, Perl and Java all have more significant shortcomings. I think the main reason is that JavaScript position in the browser forced a lot of people to use it against their will, which leads to more complaining.
- Joeri 14y agoI think javascript's main "problem" is the combination of duck typing with prototypal inheritance. People coming from a classical strictly typed OO language are very put off by that. Ofcourse, my problem is I'm so used to javascript's duck typing that I now feel horribly constrained by a strictly typed environment.