Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
wireprotocol
· 6y ago · 0 comments
I wish SQL had used a Maybe/Option type, or other algebraic data types, instead of NULL. So much safer and cleaner.
Comments
[–]
earthboundkid
6y ago
What would the behavior of the option type be? I don't see how it would behave differently than what SQL does today.
[–]
wireprotocol
OP
6y ago
Option types can require exhaustive matching. So where there can be a NULL, you would have to address it. The syntax can make it pretty easy to handle typical cases.