3 ms·
The author gets a lot of stuff wrong, and the loudmouth attitude doesn't help either. > -> vs function Starts off taking issue with the sort triviality he lat
by simplestyle 12y ago
The author gets a lot of stuff wrong, and the loudmouth attitude doesn't help either.
> -> vs function
Starts off taking issue with the sort triviality he later admonishes the language for solving in other areas. You don't have to start your function bodies on the same line.
> But, more than all of this what bugs me is the fact it's a completely transpiled language mostly for syntax sugar. What an awful reason.
What's awful about transpiling away syntactic ugliness? No reason is given. Presumably it's because you get away from the source. But you can read that source in the compiled js. What's the problem?
> Just use a for(i=0;i<=10;i++), but if you need to use for...ins a lot, write a helper function that takes care of the hasOwnProperty() check.
You can't use the suggested loop to iterate over an object. The indices aren't intengers. This brings me back to a quote earlier in the article: "That is pure fucking laziness in my opinion and it really makes it hard for me to take their opinions seriously after."
> I find wart removal to be an awful selling point. In other words you're saying "Fuck the need to learn how to write JavaScript, we'll fix it for ya." You really need a transpiled language to save you some time from learning the right way to write JavaScript in the first place? Learn JavaScript's pain points and just don't do them.
Using CoffeeScript doesn't stop you from learning about JavaScript's warts. It does alleviate the need to constantly dodge the same problems. I don't need a transpiled language just like I don't need an accountant to deal with my taxes every year.
> Learn JavaScript's pain points and just don't do them. It's like that C/C++ quote goes: "In C++ it's harder to shoot yourself in the foot, but when you do, you blow off your whole leg." Bjarne Stroustrup.
Easier said than done. Everyone makes mistakes. The quote was not meant to reflect favorably on C++.
> Luckily there's numerous small libraries to try to shim classes into JavaScript.
Cool. Let's write lots of tiny helpers and pull in lots of small libraries to address issues that are collectively addressed in one very focused project. I'll go with option B.
> After everything, CoffeeScript is for people who hate JavaScript.
What in the fuck?
- mercer 12y agoI sometimes use CoffeeScript for personal stuff, but have mostly moved back to plain JavaScript even for that. And yet I find this one of the silliest articles about why not to use it. You've explained why very well. The main reason I moved back to plain js is that: 1. I can't really get used to significant whitespace. But that's mostly just taste. 2. CoffeeScript is a bit too ambiguous for me at times. It makes me feel the same way Ruby On Rails does. But that might also just be a personal preference. That said, I really miss a lot that CoffeeScript offers. Can anyone recommend a similar and ideally popular project that offers much of what CS has (brevity and comprehensions being among the main things) without the significant whitespace, and without the ambiguities?