6 ms·
I think one reason is that lots of people know it. And if you already know something, you don't have to learn something new. Sometimes that's bad. For example,
by bphogan 12y ago
I think one reason is that lots of people know it. And if you already know something, you don't have to learn something new.
Sometimes that's bad. For example, someone trying to make a super performant iOS app who only knows JS and refuses to learn Objective-C and C++.
Sometimes it's fine, like a web developer who needs to deliver a business app on all the mobile devices.
I think the fascination with JavaScript is interesting, personally. I don't enjoy the language, but I can't deny that it's easy to pick up for beginners. It has a low barrier to entry, and can, in some cases, encourage people to learn to make things on the computer.
I do find quite a few folks who refuse to look past JS or Node. Honestly, using JS on the server side makes no sense to me, given that Go or Erlang can do concurrent backends better, and other tech can do regular web backends better.
But still, the fact that good JavaScript programmers can bring there talents to the backend does have merit.
We're software developers, charged with solving problems in exchange for money. The tool that does that in the most effective and efficient way is the right tool, right?
- PhrosTT 12y agoI would dispute that it's easy to pick up for beginners. It's easy to START doing then things, and then intricacies you don't understand will kill you. The prototype chain, function call context, closures, asynchronous code, etc. Type class Dog extends Animal into js2coffee.org and you get this: var Dog, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; Dog = (function(_super) { __extends(Dog, _super); function Dog() { return Dog.__super__.constructor.apply(this, arguments); } return Dog; })(Animal);
- personjerry 12y agoYeah I remember seeing a post on HN that challenged the user on the behavior of some especially tricky javascript.
- bphogan 12y agoFirst, I'd argue that none of that would be "beginner" things. Programmers always seem to forget what it is like to not know how to program. A beginner would never use something like that. Second, when you bring class-oriented Java-style constructs to JavaScript, it looks ugly because it's not what JavaScript is about. JavaScript is different. It's got a completely different way to do OOP, which you have to learn. I'll agree that JS has weirdness. But a lot of the things we think are "wierd" are things that seem strange because we've programmed in Java or something else. Ask someone who started with JS and only learned JS. They don't find those things strange at all.
- kingdomking 12y agoWhat you're saying is true for a lot of languages. What you're missing from OP's comment is that it's easy to pick up, which is still true despite your example. Picking up a language doesn't mean much more than getting something done to an ordinary beginner and that's certainly a lot less fleshed out than both my and your standards of picking up a language.