Comment

Comment by nemothekid

>Passing errors around manually when the machine could do it is a waste of time however it's dressed up.

You, the writer, pass around errors manually so that the reader, who interfaces with the code 10x more than the writer, is able to reason about the code. Go's errors handling sucks, but I don't think everyone has the same opinion on why it sucks; I personally think that sum types should be added to the language making it impossible for errors to be silently ignored.

Exceptions, while convenient, require too much discipline to use cleanly.

parent nemothekid 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton