you are viewing a single comment's thread
view the rest of the comments
[–] 5 points 3 years ago* (3 children)

It has std:option

So every object that can be None or Some, needs to be checked when used. And only options can be set to None

  • source
  • parent
  • hideshow 3 child comments
  • [–] 5 points 3 years ago* (last edited 3 years ago) (2 children)

    Yeah it's a bit inaccurate to say it's not supported. It just has edge case handling written explicitly into whatever thing you're building (I assume it's required to do so in order to be well-typed). It took this idea from Haskell, which might have gotten it from Miranda or something.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 3 years ago (1 child)

    I like the pattern a lot more. It makes you just initialize the value and only keep it 'nullable' for where it's needed and then you need to check. Even .net implemented it (but a bit more awkward)

  • source
  • parent
  • hideshow 1 child comment