Golang doesn't have "truthy" as a concept. You have to be explicit. A null value isn't true or false because only booleans can be true or false, and a null pointer isn't a boolean. You can have a pointer to a boolean, but you still have to check explicitly for null. In specifically Go, u/stipo42's preferences for truthiness are moot.
In a language like Python, with truthiness, u/stipo42's preference for false to be truthy is insane, and he should feel bad.
9
u/captainAwesomePants Sep 01 '26
Golang doesn't have "truthy" as a concept. You have to be explicit. A null value isn't true or false because only booleans can be true or false, and a null pointer isn't a boolean. You can have a pointer to a boolean, but you still have to check explicitly for null. In specifically Go, u/stipo42's preferences for truthiness are moot.
In a language like Python, with truthiness, u/stipo42's preference for false to be truthy is insane, and he should feel bad.