5 ms·
i also don't use CoffeeScript because of any 'feature' it has over standard JS but instead because of its concise but expressive syntax. it's less about what i
by twykke 9y ago
i also don't use CoffeeScript because of any 'feature' it has over standard JS but instead because of its concise but expressive syntax. it's less about what it does have/do, and more about what it doesn't have/do.
some small aspects of CS i forgo because they (in my opinion) are a little too concise such that they sacrifice readability, but all in all it has my favorite syntax of any language.
- ralmidani 9y agoExactly. I personally think calling .map() on an array is more readable than an array comprehension. But since CS is "just JavaScript" you are free to use the native JS array methods (and even more elegantly, at that).
- twykke 9y agolist comprehensions was exactly what i was talking about :) however i replace them with lodash and ramda, which benefit enormously from CS's lambda syntax
- atom-morgan 9y agoI wish this line of thinking was more common. So many people feel forced to use parts of a language when you don't have to.
- sgustard 9y agoCS breaks the ternary ?: operator which is a big headache for me.
- igl 9y agoEverything is an expression. Including if statements. There is no need of such syntax abominations.
- jashkenas 9y agoBingo. Remember when you first first learned the ternary operator syntax? I recall thinking something along the lines of, "Wow, that's cryptic!" result = if condition then success else failure
- sgustard 9y agoSure, but other coffee operations like x||=5 are also abominations. Brevity and purity are often at odds and the choices made by a language can be arbitrary.