|
|
|
|
|
by tqs
5170 days ago
|
|
I think you're spot on with your comment on syntactic weight. Coffeescript vs Javascript forms a good case study because they largely have the same semantics but with different syntax for key features. To my mind, the big difference with Coffeescript is the syntax for functions, e.g. (x) -> x * x vs. function (x) {
return x * x;
} Coffeescript's syntax eliminates "function" and "return", which significantly lightens the syntactic weight for functions. I would assume on average that Coffeescripters write significantly more functions than Javascripters (say, for normalization, per bytes of minified JS). This assumption is based on reinforcing selective pressures: Coffeescript encourages programmers to write more functions, and programmers who want to write more functions choose Coffeescript. |
|