Why does Haskell say Nothing instead of None? Didn't occur to them or was rejected? I can see why Some is less than ideal since it rhymes with "sum".
Conversation
And I presume Rust far postdates these Haskell decisions. But I still suspect lots of options got discussed.
1
1
Rust borrowed the naming of Option, Some, and None from OCaml and SML. Not sure where Maybe, Just, and Nothing came from - maybe Miranda?
2
2
Hmm, I can't see maybe defined in Miranda's stdenv (cs.kent.ac.uk/people/staff/d), but it might have been a datatype commonly in use? That said, idiomatic Miranda and early Haskell leaned much more on partial functions, so it might have seen less use.
1
2
Another Haskell precursor, Orwell, does not define it in its stdenv either: homepages.inf.ed.ac.uk/wadler/papers/
1
2
You might need to go through the early Haskell papers and try to spot where it first appears 🤔
1
2
Thanks much for the digging you've done.
1
2
1
2
Interesting - I don't think I see a mention of Maybe in v1.0 of the Haskell Report? raw.githubusercontent.com/joyofhaskell/h … unless I'm missing something?
1
2
Going through typeclasses.com/timeline, it pops up in 1995 in web.cecs.pdx.edu/~mpj/pubs/spri - along with an Error type which looks very close to Rust's Result type! (unlike the Either type which was eventually added)
1
2
Seems like Maybe and Either were then added to the Haskell report in version 1.3: raw.githubusercontent.com/joyofhaskell/h - so it seems like it is a Haskell thing?
Would love to know more background on it, but it might require trawling through mailing lists, or emailing Mark P. Jones. Now I am curious about where and when Standard ML got option!
1
2
Show replies

