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?
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.Sign up to join this community
Scala is also inspired by Ocaml, which uses Option.
Options are an Ocaml standard type that can be either
Some xwhere 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.
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
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.