News for hackers. Stuff that matters.
Re:The Great CoffeeScript to Typescript Migration of 2017 by vlunkr on Friday May 15, 2020 @07:13PM (#23198604)
I still have a soft spot for coffeescript, I think it's a very nice language to write. I don't use it simply because no one else at my company does. But at this point, like others have said, JS is much better than it used to be. You have the arrow functions and classes from coffeescript, and honestly, those were probably the strongest features. Although it can probably forever hold the lack of semicolons the javascript's head.
Re:The Great CoffeeScript to Typescript Migration of 2017 by markdog12 on Friday May 15, 2020 @09:29PM (#23199595)
You know you can write JavaScript without semicolons, right? Or did you know, but also know that it can bite you?
Re:The Great CoffeeScript to Typescript Migration of 2017 by scotty79 on Saturday May 16, 2020 @01:58AM (#23200834)
I think it's just strongly frowned upon for not many good reasons.

Examples of how can it bite you I could find were really simple. Classic 'newline after return' doesn't go away if you put in semicolons manually because it happens because even if you put them in manually they are still inserted in other places you didn't expect and you have to be still aware of that.

The other bug I've seen is when you start a line with '(' which will be interpreted as function call of a function from previous line. Putting in semicolons at the end of each line saves you from that almost always easily detectable error. But you'd be just as safe if you just put ';(' at the begining of next line instead of '('. And I think starting a statement with '(' is weird enough and specific to javascript (in C family) that ';(' is not much weirder.

I use semicolons in js but for purely esthetic reasons so it looks like Java, C++, PHP, C# and such.