Hacker News new | past | comments | ask | show | jobs | submit login

Not really, but neither are ugly nested if statements (Flat is better than nested, readability counts, etcetera). You need to make tradeoffs.

Maybe it would have been better to only have a single := assignment operator to begin with. But it's a few decades too late for that.

For what it's worth, := is for expressions only. Using it as a statement is a syntax error. So there won't be a lot of cases where both are equally elegant options.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: