Hacker News new | ask | show | jobs
by anaphylactic 3081 days 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?
1 comments

Dunno, 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.
Actually, having Some(x) be just a pointer to x seems to work fine without an explicit tag, as dragonwriter says below.