Zulip Chat Archive

Stream: general

Topic: maybe?


Thorsten Altenkirch (Feb 08 2021 at 12:12):

Is there a definition of maybe (ie 1+X) in the library. It is a bit difficult to search for on google. :-(

Anne Baanen (Feb 08 2021 at 12:16):

docs#option

Kevin Buzzard (Feb 08 2021 at 12:30):

The correct way to search is to post your query in #Is there code for X? :-)

Patrick Massot (Feb 08 2021 at 12:35):

Where does this option name comes from? The Haskell name is maybe, right? Is option used somewhere else?

Patrick Massot (Feb 08 2021 at 12:35):

optional would clearer than option, and maybe is shorter than optional.

Ryan Lahfa (Feb 08 2021 at 12:37):

Patrick Massot said:

Where does this option name comes from? The Haskell name is maybe, right? Is option used somewhere else?

Option is the canonical name in OCaml and Rust I believe

Ryan Lahfa (Feb 08 2021 at 12:37):

(and maybe C++ too)

Ryan Lahfa (Feb 08 2021 at 12:38):

(optional for C++ rather hm)

Gabriel Ebner (Feb 08 2021 at 13:06):

Most likely Coq: https://coq.inria.fr/library/Coq.Init.Datatypes.html#option


Last updated: Dec 20 2023 at 11:08 UTC