logoalt Hacker News

jchwlast Tuesday at 7:25 PM2 repliesview on HN

IMO: because it behaves like structured control flow (i.e. there is a branch) but it doesn't look like structured control flow (i.e. it doesn't look like there is a branch; no curly braces). I don't think there's a single other case in the Go programming language: it doesn't even have the conditional ternary operator, for example.


Replies

LoganDarklast Tuesday at 8:11 PM

`return` doesn't have braces either.

show 1 reply
_kidlikelast Wednesday at 5:01 AM

the obvious solution is try-catch, Java style. Which I'm surprised it's not even mentioned in the article. Not even when listing cons that wouldn't have been there with try-catch.

But of course that would hurt them and the community in so many levels that they don't want to admit...

show 2 replies