3 ms·
Is CoffeeScript a higher abstraction level from JavaScript? Whenever I've taken a casual look at coffeescript I came away with the impression it was just syntax
by Swizec 14y ago
Is CoffeeScript a higher abstraction level from JavaScript? Whenever I've taken a casual look at coffeescript I came away with the impression it was just syntax sugar.
- Toshio 14y agoCoffeeScript is to JavaScript what an ORM is to SQL - a scripted way to generate code.
- bbotond 14y agoC is to assembly what an ORM is to SQL - a scripted way to generate code.
- deleted 14y ago[deleted]
- pooriaazimi 14y agoIt is. For one thing, classes (or objects you 'new') are much cleaner in CS than any trivial implementation in vanilla JS. Splats, loops, string interpolation and comprehensions are like added bonus (they are technically syntactic sugar, but make thing so much easier, cleaner and more readable that it's worth using CS for these features alone). True, CS makes debugging a bit harder (though SourceMaps might make that a thing of the past), but as CS code is much cleaner and easier to read, stupid typos are less likely to happen and most of the time, bugs are logical not because you accidentally didn't put a semicolon there, or used ; instead of ,
- rimantas 14y agoIn my experience (I wrote substantial amount of CS code during last year) overhead for CS debugging is so small it is not even worth mentioning. In theory it looks much more serious than appears in practice.
- jlas 14y agoI think the 'stupid typo' argument is not really valid if you're using syntax checking (e.g. jshint/jslint) in your stack.
- pjmlp 14y agoWith the added pain, that besides debugging your code, you need to debug the coffescript compiler.