Rust borrowed the naming of Option, Some, and None from OCaml and SML. Not sure where Maybe, Just, and Nothing came from - maybe Miranda?
Conversation
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?
1
2
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
According to dl.acm.org/doi/10.1145/33, section 8.1, the original 1990 definition of Standard ML did not include an option type in its Basis library. This was added later by in Gansner and Reppy's specification of the basis library, but I'd imagine the idea would predate this?
1
2
Curious if Hope ever had a common equivalent of the option type. Sadly it's too trivial to really take up valuable space in papers and articles (they seem to prefer lists and trees for examples): cs.kent.ac.uk/people/staff/d
2
1
Show replies

