News for hackers. Stuff that matters.
Re:How we failed, then succeeded, at migrating to TypeScript by sa46 on Sunday October 13, 2019 @03:06PM (#21242211)
> How easy it is to digest

I’ve not had this experience. I’ve found the ambiguity in coffeescript a maddening adventure in syntax confusion.

- function call syntax doesn’t need parens except if a 0 parameter method

- commas are largely optional both in arrays and function parameters. How do you parse: [f, f(), f a b c]

- implicit returns are a terrible idea.

- the @ syntax refers to either a ‘static’ method or an instance variable depending on the context.

- I have to do a double take for the object literal syntax every time

Re:How we failed, then succeeded, at migrating to TypeScript by AriaMinaei on Sunday October 13, 2019 @03:27PM (#21242362)
Don't want to invalidate your experience. For me though, I rarely struggled with ambiguity.

> function call syntax doesn’t need parens except if a 0 parameter method

Function call syntax doesn't require parens so to make multi-line calls punctuation-free. Especially if some args are objects.

> commas are largely optional both in arrays and function parameters. How do you parse: [f, f(), f a b c]

Well commas are not optional.

> implicit returns are a terrible idea

They're especially elegant in writing declarative code. It takes some getting used to though.

> the @ syntax refers to either a ‘static’ method or an instance variable depending on the context.

Agreed.

These are all tradeoffs though. For me, they struck the right balance between ambiguity (very little) and expressiveness.

LiveScript in comparison was much more sugary (which I preferred): https://livescript.net/

Re:How we failed, then succeeded, at migrating to TypeScript by k__ on Sunday October 13, 2019 @06:10PM (#21243498)
Haha, yes. LiveScript should have won. It were awesome times.

Well, guess it's Reason for me now :D

Re:How we failed, then succeeded, at migrating to TypeScript by dagw on Sunday October 13, 2019 @05:48PM (#21243342)
My experience was that I always found my CoffeeScript really easy to read since I was always internally consistent with which opinional bits I used and which bits I ignored.

Reading other people's CoffeeScript on the other hand...

Re:How we failed, then succeeded, at migrating to TypeScript by Jare on Sunday October 13, 2019 @05:14PM (#21243088)
I was very excited about CS when I learned about it, and in my initial tests found it really pleasant to write. However, before committing to using it more, I went and read some other projects written in it. At that point I decided that the reading experience was confusing, and the lack of "visible" syntax elements to guide me drove me nuts.
Re:How we failed, then succeeded, at migrating to TypeScript by EdwardDiego on Monday October 14, 2019 @12:49AM (#21245330)
Don't forget fat arrow vs. thin arrow. If you're not writing Coffeescript 24/7 you start to forget which is which.