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

One might want to add that it does work when you use a variable however. https://play.golang.org/p/6UfNFWm_-JR



The issue isn't that they're constants, but that GP called them "true" and "false" and assigned the opposite values you'd expect. You can break it in exactly the same way with variables: https://play.golang.org/p/EVU84l0A57I

Kinda crazy to me that Go doesn't reserve the words "true" and "false", but ¯\_(ツ)_/¯




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: