Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

[deleted]


Go doesn't have the ternary operator, and I thank the Go gods for that every day :)

Go is good because it's hard to write clever code in it. Go encourages simple code. Clever code is almost always bad. It's hard to understand and easy to screw up. For example, at work we had a bug in production for 5 years that short circuited our authorization code because of an incorrectly written ternary statement. If the author had written a simple if statement, the error would have been blindingly obvious. It should have been caught by tests, but due to how the tests were written, that particular path never got called.




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

Search: