Hacker News new | ask | show | jobs
by tlrobinson 4695 days ago
What overhead? If you mean performance, there's actually basically no runtime performance overhead in most cases. In fact, if you use CoffeeScript's "for" loops have a performance advantage over JavaScript Array's map()/forEach() methods.

I used to have a similar opinion but was forced to use CoffeeScript on a project and haven't looked back.

3 comments

> What overhead?

The overhead of tooling, extra dependencies, debugging complexities and new syntactic constructs.

If you're going to pay for all that, why not bite the bullet and use a language which actually improves the states of things and adds useful semantics?

The overhead of having an additional dependency. The more moving parts there are, the more things can break.
Then why don't you write assembly?
1. Since when can you write web applications in assembly?

2. Languages built upon assembly generally have better user experience, better tooling, better semantics and effectively no more dependencies than assembly. CoffeeScript has very slightly better user experience, worse tooling, identical semantics and more dependencies than javascript.

1. That's missing the point, but since you asked, Emscripten and Native Client.

2. I disagree that CS's user experience is only "very slightly" better, but that's very subjective.

Tooling is a somewhat valid complaint but it's a young platform and it's improving (source maps, etc).

Semantics aren't quite identical (scoping, implicit return values, "fat arrow" functions).

How does CS have more dependencies than any other compiled language? The only dependency is a compiler.

> 1. That's missing the point, but since you asked, Emscripten

Has LLVM grown an assembly frontend? Emscripten is more or less an LLVM backend.

> and Native Client.

These are no more web applications than writing firefox extensions at this point.

> Semantics aren't quite identical (scoping, implicit return values, fat arrow functions).

For the most part, this is minimal syntactic sugar, not significantly different semantics.

> How does CS have more dependencies than any other compiled language?

It does not, the point is that javascript has no dependency, and that if you're going to add a compiler dependency you might as well go for real changes.

> Has LLVM grown an assembly frontend? Emscripten is more or less an LLVM backend.

I don't know, probably, but LLVM's IF is essentially machine independent assembly anyway.

But again, missing the point.

Look, I think masklinn very clearly got your point. It just happens that your point was expressed in an unconstructive fashion, and then you keep (again, unconstructively) repeating "you don't get the point" without following up with a clearer explanation of what your point is (notwithstanding that I think we all understand your point).
Because high level languages provide me a significant freedom from concerns about implmentation, freeing up my mental cycles for the business problem at hand.

The height of the level of js and cs don't seem significantly different.

Other people have answered this for me, but I mean the overhead of another moving part in the tool chain. Sometimes this is worth it (i.e. your example of C v. assembly down thread), but I don't think it's the case here.

I don't mean to suggest CoffeeScript is without value. I just don't think it has hit the requisite "escape velocity" to make me want to integrate it to my tool chain.