4 ms·
Coffeescript: Joyful and Unreadable
- brikis98 15y agoLooking at things in a vacuum is not very productive. The equivalent code with just raw JavaScript - that is, with no templates, no CoffeeScript, no backbone - would be MUCH more verbose, complicated, and hard to read/maintain. For example, the => actually makes the code shorter and more readable than the equivalent versions (var that = this all over the place). The el and @template have nothing to do with CoffeeScript: they are from backbone and underscore, respectively. And once again, they are better than the raw JS alternatives (document.getElementById()? and inlining HTML into your JS).
- allenc 15y agoRight - what I'm saying is that it's okay to be slightly more verbose if it means added readability. My point was that it was the comb. of 4 libraries that's causing a lot of context switching on the same line of code.
- brikis98 15y agoIf your central point is about context switching, you probably should've picked a different title for the post :)