Live data from Hacker News

CoffeeScript is not a language worth learning

github.com

71–80 of 132 posts

Re: CoffeeScript is not a language worth learning

#71

Earlier quoted context omitted.

> But I absolutely never think about overriding a parent function > in JavaScript. In CoffeeScript this is actively encouraged. Unfortunately, if you never think about overriding a parent's implementation of a function in JavaScript -- all that means is that you willfully don't use prototypes. The famous "prototype chain", by which object-orientation in JavaScript is accomplished, is all about overriding versions of…

There are a half a dozen different implementations of class inheritance in JavaScript. However no one writing a JS library is going to ask the consumer to extend one of their objects. This is what inheritance is all about. In Java you extend everything. Backbone.js is the only popular JS library I can think of which has their users use this pattern. It doesn't make since most of the time because: 1) The use of the pa…

> However no one writing a JS library is going to ask the consumer to extend one of their objects.

Uh, if you're using the Closure libraries, you very likely are extending goog.Control or goog.Component. I don't know dojo, but from my brief perusal of the docs it looks like you do the same thing with dojo.declare. YUI seems to do the same with Widget. I'm not aware of a UI framework in JS that doesn't use inheritance from outside the library.

Re: CoffeeScript is not a language worth learning

#72

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.

I'm not sure if you're a fan of Dart or not, but it has nine of those now (classes, types, modules, generics, actors, properties, interfaces, abstract classes, and tooling) and more on the way.

Might be worth giving it a try.

Re: CoffeeScript is not a language worth learning

#73

Earlier quoted context omitted.

I find really well-written CoffeeScript easier to comprehend and scan, even though the community at large believes I hate the stuff entirely (I don't). I'm just not sure if it's enough to make up for a less-than-optimal debugging experience, especially considering that most of us don't write really excellent code all the time.

So now we need Coffeescript, The Good Parts.

No, we need Coffeescript, the mature toolchain.

Re: CoffeeScript is not a language worth learning

#74

Earlier quoted context omitted.

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.

I'm not sure if you're a fan of Dart or not, but it has nine of those now (classes, types, modules, generics, actors, properties, interfaces, abstract classes, and tooling) and more on the way. Might be worth giving it a try.

Yes I like the direction dart is going in (except would prefer the type system had more actual meaning than just annotations for tooling, but still).

My pipe dream: - Google implements a VM for dart or equivalent.

- Dart, Java, C#, ActionScript, Python, Ruby, whatever, can compile to this VM.

- VM/bytecode is initially just in chrome, which is fine as far as I am concerned (no problem saying our app works in chrome only). You can transpile to JS if you want to target other browsers.

- Because of native VM implementation in chrome, the best web applications are in chrome. Chrome increases in popularity.

- Other vendors are forced to implement this VM.

- We get to something like a client VM (lets call it CVM) standard for all browsers.

- Developer productivity improves and browser based apps start not sucking so bad in comparison to their native brothers.

Re: CoffeeScript is not a language worth learning

#75
Syntax matters in every way. If you think @foo is prettier than this.foo, and you get to write the former every day instead of the latter, you will write better code, be more productive, and love life a little bit more. Programmers hate to admit that they like nice things, but my experience confirms it.

Re: CoffeeScript is not a language worth learning

#76
I've always found the Perlis quote to be false. It seems to assume that existing languages align well with how I think. A good quip only needs a grain of truth I suppose, but for that reason I wouldn't give such a quip a prominent place in a logical argument.

Re: CoffeeScript is not a language worth learning

#77
post #68
post #67

I find these anti -CoffeeScript articles annoying. I use CoffeeScript, because it works for me. If it doesn't work for you, whatever, write plain JavaScript. This article just argues over what is and what is not a language.

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".

Re: CoffeeScript is not a language worth learning

#78

Earlier quoted context omitted.

> But I absolutely never think about overriding a parent function > in JavaScript. In CoffeeScript this is actively encouraged. Unfortunately, if you never think about overriding a parent's implementation of a function in JavaScript -- all that means is that you willfully don't use prototypes. The famous "prototype chain", by which object-orientation in JavaScript is accomplished, is all about overriding versions of…

There are a half a dozen different implementations of class inheritance in JavaScript. However no one writing a JS library is going to ask the consumer to extend one of their objects. This is what inheritance is all about. In Java you extend everything. Backbone.js is the only popular JS library I can think of which has their users use this pattern. It doesn't make since most of the time because: 1) The use of the pa…

    > 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 developers to simply throw up their hands, and write code like this instead:

    function makeHorse() {
      var horse = {
        walk:   function(){ ... },
        trot:   function(){ ... },
        canter: function(){ ... },
        gallop: function(){ ... }
      };
      return horse;
    };
... which is terribly inefficient and wasteful of memory, and accomplishes nothing that a prototype couldn't do in a small fraction of the space and time.

Re: CoffeeScript is not a language worth learning

#79
post #29

I feel bad saying this, because I respect raganwald greatly and I usually enjoy his writing, but this post is somewhere on the border between facile and false. For example: > CoffeeScript has lots of more subtle transformations up its sleeve, like comprehensions, destructuring assignment, splats, or the "fat arrow" some rail against. Here's the secret to understand: None of these things are "language features" that c…

Any source language can be said to be a simple transformation of its target language Not always. There are a number of language features that have non-local implications, such as pattern matching, lazy evaluation, continuations, or exceptions. If you implement such a feature on top of a language that doesn’t have it, you will have decidedly complex transformations. I agree that it’s overly simplistic to suggest that…

the question of local vs. non-local transformations at least hints at the idea that a new paradigm or way of thinking about programming is involved.

Which is an excellent point, and I think the essay would have been better served if you had oriented it that way, and not around the "not a language worth learning" hook.

Re: CoffeeScript is not a language worth learning

#80
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".

But the title says "CoffeeScript is not worth learning".

No, it says "it's not a language worth learning". The author's point is that CoffeeScript is not a language, but a tool for JavaScript.

Post reply on HN