logoalt Hacker News

DrNefariolast Sunday at 3:00 PM2 repliesview on HN

Most of those are a matter of preference, implicit return is just plain better, and it would be absolutely insane if closures required the return type to be specified. I do agree that the toilet bowl `|_|()` syntax is ugly, though.


Replies

mihaiclast Sunday at 4:50 PM

Again, I think JS/Typescript has a better syntax, since the implicit syntax is better when unbranched, like x => expression, but it's harder to read the more branches there are, since it's hard to visually scan where results can be located.

magicalhippolast Sunday at 9:44 PM

> implicit return is just plain better

I really dislike them. Makes me wonder if you just got distracted and forgot to finish the function. Be explicit, don't make me have to spend time figuring it out.