News for hackers. Stuff that matters.
Re:The Great CoffeeScript to Typescript Migration of 2017 by sullyj3 on Saturday May 16, 2020 @02:41PM (#23206004)
Interesting, I've never heard complaints about implicit returns before. I really enjoy them in languages like rust. What kind of bugs?
Re:The Great CoffeeScript to Typescript Migration of 2017 by agency on Tuesday May 19, 2020 @12:43PM (#23236973)
I recall several resulting from the fact that lodash's _.forEach terminates iteration early if the function you pass it returns a falsey value for any element. Most people (myself included) weren't aware of this functionality and thought of the callback as a void function and weren't even thinking of what the last expression in it would evaluate to.
Re:The Great CoffeeScript to Typescript Migration of 2017 by sullyj3 on Sunday May 24, 2020 @12:24PM (#23292580)
That just seems like a poor choice of api design for forEach, rather than a fundamental problem with implicit returns.