3 ms·
Coming from Objective-C first, which is generally a rather sensible language, I think you'll be surprised at how stupid, unnecessary and inexcusable many of Jav
by PommeDeTerre 14y ago
Coming from Objective-C first, which is generally a rather sensible language, I think you'll be surprised at how stupid, unnecessary and inexcusable many of JavaScript's problems are.
People who only have a PHP background, for instance, have become accustomed to such stupidity. They think it's "normal", solely because they don't really know any better.
Those coming from C, C++, Java, C#, Ruby, Python or most other languages, on the other hand, know that the JavaScript way is not the right way. These people generally have a much harder time coming to terms with JavaScript's numerous issues.
- drewmck 14y agoI was speaking with a colleague about Node and he suggested using Coffeescript instead of JS directly for the exact reasons you mentioned. I'm also coming from Obj-C, C and Ruby background and recently read "Javascript: The Good Parts". I'm still looking for the good parts promised in the title and introduction.
- damncabbage 14y agodagw has the best response to this below: http://news.ycombinator.com/item?id=5054382 http://news.ycombinator.com/item?id=5054382 I agree; it's a shortcut for people who know JS, not for people who are learning it for the first time. As soon as you need to use or look into the internals of a library that isn't written in CoffeeScript, everything's going to get unstuck pretty quickly.
- calibraxis 14y agoI personally happen to disagree. (I have production/team experience with both node.js and CoffeeScript.) For many learning types, I'd guess it's preferable to leisurely learn JavaScript from the shores of CoffeeScript. Rather than having to deal with all of JavaScript's absurdity at once. And when you need to read someone else's JavaScript code, you can usually get away with ignoring boilerplate.
- nicholassmith 14y agoI think that's my biggest problem, my background is heavy on C/C++, and moved onto C#, Ruby, Python and Obj-C later and whilst I think Javascript is fine in terms of providing functionality for web pages, the language doesn't lend itself to a large implementation like NodeJS unless you're supremely well versed in it.
- pkorzeniewski 14y agoIt's not that JavaScript is a bad language, it's just easy to write bad code in JavaScript. I don't get it why most people coming from languages you mentioned like to bash JS so much, I used most of these languages in the past or use them currently (mainly Java and Python) and I like JavaScript the most. The problem is most people just don't want to learn JS, they write shitty code because it's easier and than complain how bad the language is. Sure, there are many issues with the language itself, usually because of how flexible it is, but for almost every issue there is a 'good way' of dealing with it.
- mattmanser 14y agoUnless you are lucky enough to work on only your own code, that it's so easy to write bad code is a massive problem. My big beef with js is that there's no 'right' way to lay out your code. Trying to figure out how a js module works is always a unnecessarily massive pita.
- partomniscient 14y ago>It's not that JavaScript is a bad language, it's just easy to write bad code in JavaScript. In my mind, that alone makes JavaScript a bad language.
- matwood 14y agoI too have been surprised at all of the frameworks coming out for JS to be on more than the browser. From my experience large JS projects are a pain to write and maintain. It's a neat language, but I don't really get why I would want to write my server code in it.