|
|
|
|
|
by vectorpush
4531 days ago
|
|
There has been a development of hate towards CoffeeScript in most JavaScript communities. This is FUD. CoffeeScript is JavaScript, and if you come into CoffeeScript thinking it works like ruby just because it looks like ruby then you're in for a rude awakening. Personally, I'm a fan of CoffeeScript's streamlined syntax compared to JavaScript. For example: describe 'when the universe exists', ->
it 'should be active', ->
expect(universe.active).toBe true
vs describe('when the universe exists', function(){
it('should be active', function(){
expect(universe.active).toBe(true);
});
});
It's no surprise that newcomers are sometimes inclined towards CoffeeScript since one the biggest obstacles for a budding javascript programmer is the seemingly incomprehensible labyrinth of brackets, parenthesis and semicolons (not to mention the confusion that ASI adds to the picture) that one must endure to grok the language. Of course, it's not really that hard to understand, but CoffeeScript filters out a lot of "syntax" making it easier for a newcomer to tackle the meat of the application. Less is more. |
|