News for hackers. Stuff that matters.
Re:The Great CoffeeScript to Typescript Migration of 2017 by jrumbut on Friday May 15, 2020 @10:31PM (#23199972)
Unless is hugely valuable to me, "do x unless y" is great when x should happen in almost all cases.

It avoids the noise of if statements, I really miss it in languages that don't have it.

Re:The Great CoffeeScript to Typescript Migration of 2017 by jbergknoff on Friday May 15, 2020 @11:18PM (#23200202)
I have a really hard time parsing `unless`. Whenever I encounter it in Ruby or CoffeeScript code, it takes me 10-30 seconds to stop and understand what's happening with the code.

Generally, postfix conditionals are a bad idea because they are garden-path sentences [1] by design.

Glad you find them valuable, but IMO they epitomize what many other comments in this thread have said about CoffeeScript's poor readability.

[1] https://en.wikipedia.org/wiki/Garden-path_sentence

Re:The Great CoffeeScript to Typescript Migration of 2017 by st1ck on Saturday May 16, 2020 @09:17PM (#23208604)
I don't see anything common in structure between postfix `unless` and examples of garden-path sentences, which seem to be based on word ambiguity. Nothing is ambiguous in e.g. `print(x) unless x != 0`. Although admittedly without syntax highlighting, conditionality it's less obvious.