Live data from Hacker News

CoffeeScript is not a language worth learning

github.com

91–100 of 132 posts

Re: CoffeeScript is not a language worth learning

#91

Earlier quoted context omitted.

> 1) The use of the pattern is not common in the js community. The use of prototypes is ubiquitous in the JS community. There's no two ways about it. Unfortunately, the avoidance of prototypes is also a common anti-pattern in the JS community, simply because JavaScript prototypes are so awkward, fragile and verbose. Doing the wrong thing with JS prototypes is easier than doing the right thing, which leads many develo…

Obviously the use of prototypes are ubiquitous in JavaScript. No one said otherwise. The use of class inheritance, as is common in other languages, like Java, C#, Python, and CoffeeScript is not common at all. Isn't that why you built it into CoffeeScript, because people were doing hacks to get super? My point is that this is leading (and other features like await/defer will do this as well) to different design patte…

What you're calling "class inheritance" and what other folks call "the prototype chain" are one and the same thing. It's not built-in to CoffeeScript ... it's fundamentally built-in to JavaScript.

CoffeeScript is just making it three words:

    A extends B
... instead of the usual JavaScript hoop jumping:

    function ctor(){
      this.constructor = A;
    }
    ctor.prototype = B.prototype;
    A.prototype = new ctor;

Re: CoffeeScript is not a language worth learning

#92

Earlier quoted context omitted.

Obviously the use of prototypes are ubiquitous in JavaScript. No one said otherwise. The use of class inheritance, as is common in other languages, like Java, C#, Python, and CoffeeScript is not common at all. Isn't that why you built it into CoffeeScript, because people were doing hacks to get super? My point is that this is leading (and other features like await/defer will do this as well) to different design patte…

What you're calling "class inheritance" and what other folks call "the prototype chain" are one and the same thing. It's not built-in to CoffeeScript ... it's fundamentally built-in to JavaScript. CoffeeScript is just making it three words: A extends B ... instead of the usual JavaScript hoop jumping: function ctor(){ this.constructor = A; } ctor.prototype = B.prototype; A.prototype = new ctor;

Prototypal inheritance and class inheritance are not one and the same. How do I call super or base in JavaScript?

You know this, you had to add it to CoffeeScript. Do you not think the ability to call super functions leads to significantly different design patterns? If not, why did you add it? And why is EmcaScript.next probably going to have it?

Re: CoffeeScript is not a language worth learning

#93

I taught a new programmer in my department JavaScript and CoffeeScript. Yesterday he told me he saw Notch coding a 2d version of minecraft in Java at a hackaton online, and how weird is the difference between CoffeeScript and Java. Maybe for us there's nothing new in CoffeeScript. Heck, the patterns of programming in javascript, callbacks, functional programming, prototypes, closures, the context of this -- for him i…

So I'm going to learn either JavaScript or CoffeeScript over January. I have some experience in VisualBasic (took a high school programming class about four years ago). Which one should I learn?

Re: CoffeeScript is not a language worth learning

#94

I taught a new programmer in my department JavaScript and CoffeeScript. Yesterday he told me he saw Notch coding a 2d version of minecraft in Java at a hackaton online, and how weird is the difference between CoffeeScript and Java. Maybe for us there's nothing new in CoffeeScript. Heck, the patterns of programming in javascript, callbacks, functional programming, prototypes, closures, the context of this -- for him i…

So I'm going to learn either JavaScript or CoffeeScript over January. I have some experience in VisualBasic (took a high school programming class about four years ago). Which one should I learn?

JavaScript, easily.

I'm a huge, huge fan of CoffeeScript, but JS will be far more useful to you right away, and your knowledge of JS will help you understand CS more when you learn it later.

Re: CoffeeScript is not a language worth learning

#95

I taught a new programmer in my department JavaScript and CoffeeScript. Yesterday he told me he saw Notch coding a 2d version of minecraft in Java at a hackaton online, and how weird is the difference between CoffeeScript and Java. Maybe for us there's nothing new in CoffeeScript. Heck, the patterns of programming in javascript, callbacks, functional programming, prototypes, closures, the context of this -- for him i…

So I'm going to learn either JavaScript or CoffeeScript over January. I have some experience in VisualBasic (took a high school programming class about four years ago). Which one should I learn?

Learn Javascript. Coffeescript is defined in terms of Javascript. If you don't know Javascript, learning Coffeescript will be unnecessarily difficult, because you'll have to go back and learn Javascript in bits and pieces as you learn Coffeescript. If you learn Javascript first, learning Coffeescript will be easier, because Coffeescript will build upon your Javascript knowledge.

Re: CoffeeScript is not a language worth learning

#96
post #77
post #68

Earlier quoted context omitted.

You didn’t read the article. It supports CoffeeScript.

Didn't read the whole thing, nope. But the title says "CoffeeScript is not worth learning".

The correct response at this point is: Oh dear, I will endeavour to read articles in the future :)

Re: CoffeeScript is not a language worth learning

#98

what's wrong w/ javascript? fill me in, because i for one totally love js the way it is.

No real classes. No type systen (optional at least would be good). No packages. No modules. No generics. No annotations, mix-ins, actors. No properties. No interfaces. No abstract classes. Horrible to maintain on large projects. Horrible tooling. Bad performance compared to VM or Native code. So much more.

Both the classes and type system are not inherently obvious: there are plenty of valid arguments for both prototype-based OO and dynamically typed languages. I personally like prototypes more than classes and am ambivalent about static/dynamic typing.

JavaScript does have packages and modules--check out CommonJS, for example. There are some issues with them in the browser, but that's a different story.

Generics and interfaces make no sense in a dynamically typed language. Abstract classes don't really make that much sense with a dynamic type system either, and they make no sense with prototype-based inheritance. Mix-ins don't make really fit into a prototype-based language either.

Properties would be nice. I don't know about tooling--js2 mode on Emacs is infinitely better than any IDE I've ever used (and I've use a bunch). I've never had issues managing JavaScript code--less issues than Java, for example--but I've never worked on anything particularly big.

JavaScript performance is now quite good. Besides, performance is not a function of the language but a function of the implementation. You wouldn't think of Scheme as a particularly fast language, but I remember recently reading about Stalin Scheme which made it as fast or faster than C.

Really, most of your arguments seem to stem from not liking prototypes and dynamic typing--these are just preferences. Complaints about JavaScript's lacking interfaces are like complaining your Tesla doesn't have a gearbox.

Your argument really makes it seem you would like nothing more than Java/C# in the browser; I personally would like little less than that. This is probably at least partly due to the name: JavaScript makes it seem like the language is akin to Java when it really only shares a superficial resemblance.

Re: CoffeeScript is not a language worth learning

#99

Earlier quoted context omitted.

What you're calling "class inheritance" and what other folks call "the prototype chain" are one and the same thing. It's not built-in to CoffeeScript ... it's fundamentally built-in to JavaScript. CoffeeScript is just making it three words: A extends B ... instead of the usual JavaScript hoop jumping: function ctor(){ this.constructor = A; } ctor.prototype = B.prototype; A.prototype = new ctor;

Prototypal inheritance and class inheritance are not one and the same. How do I call super or base in JavaScript? You know this, you had to add it to CoffeeScript. Do you not think the ability to call super functions leads to significantly different design patterns? If not, why did you add it? And why is EmcaScript.next probably going to have it?

Buddy, we're going around in circles here ... Yes, JavaScript lacks a way to easily call "super", but that doesn't mean that the concept doesn't exist.

Calling "super" means calling the immediate parent's version of the same function. CoffeeScript is just making it one word:

    super
... instead of the usual JavaScript prototype hoop jumping:

    Parent.prototype.method.apply(this, arguments);

Re: CoffeeScript is not a language worth learning

#100

Why does CoffeeScript have so much "debate" around it? Why don't I see articles saying "Hey guys, stop writing in Erlang! I don't like it! Stop it!" Why does this guy, or anybody that takes the time to write such an article, care what I write in?

I personally write stuff like this because the act of writing out my thoughts forces me to think them through clearly. In this case, I actually do agree that CoffeeScript is a “little” language, but writing an essay in this form was an exercise in clarifying what is and isn’t a language and what that means.

Other reasons for writing essays to convince people to use or not use a language like CoffeeScript might include a very natural desire to get lots of people using the tools you prefer. If you prefer JS, but everyone else write cool stuff (like Katy!) in CS, you will be annoyed trying to read their code or step through it in your debugger.

Conversely, if you prefer CS, getting momentum behind it ensures its future and increases the probability you will still be able to use it in the future.

I can certainly appreciate why people might want to evangelize either position. For me, it was an exercise in taking an interesting position—that it’s about the JavaScript it generates not the grammar or syntax—and see if I could make a credible argument.

Post reply on HN