3 ms·
Maybe is just another Optional type, but with a much weirder name, so that's pretty obvious. But this makes me wonder - does Haskell optimize `Maybe`-like types
by anaphylactic 9y ago
Maybe is just another Optional type, but with a much weirder name, so that's pretty obvious. But this makes me wonder - does Haskell optimize `Maybe`-like types down to a null-pointer, like Rust does?
- user2994cb 9y agoDunno, but I'd have thought that you can make None look like a null pointer, but Some(p) needs to be tagged in some way.
- user2994cb 9y agoActually, having Some(x) be just a pointer to x seems to work fine without an explicit tag, as dragonwriter says below.