4 ms·
i would contest the fewer surprises point. it may be convenient when it's your main language and you deal with it every day, but for somebody that only touches
by keymone 10y ago
i would contest the fewer surprises point. it may be convenient when it's your main language and you deal with it every day, but for somebody that only touches it once in a while it is riddled with quirks and warts. one has to constantly keep mental model of both languages in his head when developing to be productive.
trivial example:
{ a: b
c: d }
guess what this transpiles to (hint: not an object)
this is about as far from least surprise principle as you can get.
- shakna 10y agoIt looks like an object to me: [0] [0] http://coffeescript.org/#try:%7B%20%22a%22%3A%20%22b%22%2C%20%22c%22%3A%20%22d%22%7D http://coffeescript.org/#try:%7B%20%22a%22%3A%20%22b%22%2C%2...
- keymone 10y agohttp://coffeescript.org/#try:%7B%20a%3A%20b%20%7D http://coffeescript.org/#try:%7B%20a%3A%20b%20%7D - object http://coffeescript.org/#try:%7B%20a%3A%20b%2C%20c%3A%20d%20%7D http://coffeescript.org/#try:%7B%20a%3A%20b%2C%20c%3A%20d%20... - object http://coffeescript.org/#try:%7B%20a%3A%20b%0A%20%20c%3A%20d%20%7D http://coffeescript.org/#try:%7B%20a%3A%20b%0A%20%20c%3A%20d... - bullshit i understand why this happens, i just think it's a stupid edge case that shouldn't exist. and there are more like that in coffeescript.
- shakna 10y agoInteresting. Not something that's hit me before. But, I'd still take an edgecase over other JS quirkiness.