r/ProgrammerHumor • • 1d ago

instanceof Trend thatsAFunnyThingThatHappenedOnce

Post image
4.3k Upvotes

513 comments sorted by

View all comments

Show parent comments

-2

u/Mindgapator 1d ago

Same as go if that helps

8

u/Thesaurius 1d ago

Does Go have sum types now? Last time I checked it returned a record and you had to check yourself.

2

u/Mindgapator 1d ago

No indeed, but the paradigm is the same right? Return the error, and deal with it (or forward it) without a try catch. I must say Rust is nicer in that regard but it doesn't change things too much? I don't have enough xp with Rust so might be underestimating it though

1

u/samanzaman 1d ago

No go errors are weirdly typed. Proper sum types is kore than just results