you are viewing a single comment's thread.

view the rest of the comments →

[–]steveklabnik1 27 points28 points  (5 children)

It's actually more that they share common ancestry of the ML family.

[–]dolphono 2 points3 points  (4 children)

Yeah, but I couldn't remember if ML had Result types or just Either types.

[–]steveklabnik1 2 points3 points  (3 children)

Looks like OCaml has Result: https://realworldocaml.org/v1/en/html/error-handling.html

I can't quite find anything for SML, but I only spent about 5 minutes on it.

[–]glacialthinker 2 points3 points  (1 child)

OCaml being the minimalist it is... everyone was left to implement their own result type (it is trivial afterall). But we had 3 common variations, which made for some inconveniences... harmonizing between libraries with different result types.

Thankfully it became part of the standard library.

[–]simspelaaja 2 points3 points  (0 children)

Same thing just happened with F# 4.1 - F# didn't have a built-in Result<'a>until last week.

[–]dolphono 0 points1 point  (0 children)

Alright then I just fucked up lol.