@12
Java attempted to deal with this with checked exceptions, which made a lot of people angry and are now widely regarded as a bad idea.
A lot of languages have this pattern, but it doesn't feel nearly as contrives or ugly as it does in Go. In functional languages (Scala's Try blocks, Ocaml's Result and Or_error systems) you get nice first-order structures, so your code becomes:
(do a thing).map(
do something else
).map(
do something something else
).iferror(
handle it!
).getValue
@hrefna yeeeesh. We feel like as a kid we learned like a weird bastardised combination of C and Python? and that has just absolutely stuck with us, and then we learned C#......... of the terrible projects we created in C# we hall not speak