3 ms·
I haven't read the link yet, but I'm curious if anyone here knows of any research comparing Three-Valued Logic or SQL NULL to Category Theory and Haskell's Mayb
by pjungwir 9y ago
I haven't read the link yet, but I'm curious if anyone here knows of any research comparing Three-Valued Logic or SQL NULL to Category Theory and Haskell's Maybe monad? They seem very similar to me: like mapping Nothing, the SQL NULL is "contagious". It doesn't crash your program. I'd love to find a paper comparing the two, but maybe they are just two untouching worlds of research. Any thoughts?
Sometimes I think, "It'd be cool to define some custom types for Postgres that are Maybe<Text>, Maybe<Integer>, etc." But then I think, "Actually, that's how the built-in types work already!"
- unhammer 9y agoThen you may find the discussion of NULL vs DEFAULT and Maybe's in https://ren.zone/articles/opaleye-sot https://ren.zone/articles/opaleye-sot interesting.