Hacker News new | ask | show | jobs
by hot_gril 723 days ago
Yeah, I think it's best to first rethink of null as just, not 0 and not any other number. What that means depends on the context.

Tangent: I've seen an antipattern of using enums to describe the "type" of some polymorphic object instead of just using a oneof with type-specific fields. Which gets even worse if you later decide something fits multiple types.

1 comments

I love oneofs in the language with good support, but they are woeful in Golang and the "official" grpc-web message types.