4 ms·
You completely agree with everything he wrote, after a year full-time? Really? So you would use curly braces and commas to specify an object, and then be conf
by ilaksh 13y ago
You completely agree with everything he wrote, after a year full-time? Really?
So you would use curly braces and commas to specify an object, and then be confused when CoffeeScript doesn't get it?
After a year you didn't figure out that its a best practice to leave off the parenthesis in just the outermost function call, but to include them in the other calls on a line to make things clear?
After a year, you didn't realize that with the CoffeeScript scoping rules, you couldn't just throw in a global at the last second without looking carefully to see if it was used somewhere else?
After a year, you still hadn't learned about function binding with fat arrow?
After a year, you still hadn't learned that the existential operator (?) means you don't have to use typeof nearly as much?
- crazygringo 13y agoHa! Not necessarily those specific examples, but the overall reaction to it. Here are a couple of other articles which explain the same things: Section "full of surprises": http://ruoyusun.com/2013/03/17/my-take-on-coffeescript.html http://ruoyusun.com/2013/03/17/my-take-on-coffeescript.html http://ceronman.com/2012/09/17/coffeescript-less-typing-bad-readability/ http://ceronman.com/2012/09/17/coffeescript-less-typing-bad-... And here's an old HN comment of my own which described a few representative difficulties: https://news.ycombinator.com/item?id=4518892 https://news.ycombinator.com/item?id=4518892 Also, there's no such thing as a global in CoffeeScript (unless you explicitly specify window.xyz), since everything is scoped to the file. And that's the point -- it's ridiculous to have to "look carefully" at all your code to see if functions further down share a variable name inside of them. In JavaScript, you don't need to worry about that because you know "var" scopes each variable to its function, regardless of whether a higher function or global variable uses the same name. In CoffeeScript, you suddenly do have to worry about that, which is fairly insidious and bug-prone behavior.
- ilaksh 13y agoHm.. well you may want to use more precise language in the future, because you said you "completely agree" and that it describes "exactly". So you are saying that none of those particular issues are problems you are having today with CoffeeScript or were problems for most of the year? In which case, what problems did you have? Edit: it looks like in another thread you are pointing out some random and unmaintainable code examples that are ambiguous and saying that its hard to know how they will be interpreted by the compiler. Its hard to know how those examples would be interpreted by anyone, or why you would write code like that and create that problem for yourself.
- antihero 13y agoI used it for about 6 months, and realised that it simply wasn't worth the hassle. Yes, it looks a bit prettier and the destructuring is nice, but it adds a level of ambiguity that just ain't nice. The lack of explicit scoping is horrible, and the lack of actual named functions is annoying. The only thing I use now is JSX (when doing ReactJS), or TypeScript when not using JSX, as that adds actual value.