Why is the Scala Option type not called Maybe, just as in Haskell?

Maybe makes a lot more "semantic sense" to me, but maybe Option has different behaviour I am not aware of.

Is there any particular reason why Option in Scala was not called Maybe?

closed as primarily opinion-based by Robert Harvey, user40980, durron597, Kilian Foth, GlenH7 Sep 15 '15 at 14:21

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.


Scala is also inspired by Ocaml, which uses Option.

Options are an Ocaml standard type that can be either None (undefined) or Some x where x can be any value. Options are widely used in Ocaml to represent undefined values (a little like NULL in C, but in a type and memory safe way)...

I think the name chosen is a matter of taste.

  • 8
    F# too. The page on Wikipedia is en.wikipedia.org/wiki/Option_type. Seems to be a more standard name than Maybe – KChaloux Aug 9 '13 at 14:30
  • 2
    Ocaml gets the name from SML. In a quick glance through Landin's The Next 700 Programming Languages I didn't notice an option type, so SML might be the origin of the name. – Peter Taylor Aug 26 '13 at 10:56
  • 1
    An argument in favor of Option is that it's an optional value (either you get it or you don't). Maybe implies some degree of uncertainty on the programmer's part. Maybe there is a value? I don't know.. Should I get a value? The wording optional value sounds more intentional in my opinion. – Jochem Kuijpers Aug 27 at 15:20

A better question here would be why Haskell's option type is called Maybe. ML's option type is probably the grandaddy of all option types, and it's called option.

In any case, this is a terminological question, so it's not going to have a principled answer. The people who picked the name in Haskell liked it better, that's it.

  • 2
    What possessed you to repeat information in a new answer that's already well-covered by the accepted answer and its underlying comments? – Robert Harvey Sep 15 '15 at 1:03
  • 4
    @RobertHarvey ML having set the precedent is new information, the real problem is that the answer is conjecturing even that. – djechlin Sep 15 '15 at 1:04
  • OK. Do you have a reference, or something more than just an opinion? Because opinions are better represented as comments, not answers. Especially your second paragraph. – Robert Harvey Sep 15 '15 at 1:09
  • 2
    Def. Option: The act of choosing; choice. Def. Perhaps; possibly; An uncertainity; An uncertain reply. For me that is eough to say Maybe is the much better name from a purely linguistic point of view. "Option" implies that there are (multiple) choices, while the monadic name "Maybe" is much more to the point: one thing or nothing. But yes, ML (and hence, Option) came first, so that may be the reason for the bad naming habbit (And see Peter Taylor's comment to the right answer above - he does reference ML). – fnl Sep 15 '15 at 12:25
  • @fnl See my comment on the other answer; I think there's a reasonable case to make that option is an abbreviation for optional. In which case the (multiple) choices are reduced to just two: either it's there or it isn't. – Jochem Kuijpers Aug 27 at 15:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.