Hacker News new | past | comments | ask | show | jobs | submit login

I think it speaks well towards the ferocity and forced completeness of Go's error handling that err is the most used word.



I would say it shows that this is a place where the compiler could help :D


As much as I hate all the typing I do for error checking in go, I just don't think a compiler can handle errors that well on their own yet.

The explicitness of go's error handling forces you to handle every error specifically. There isn't a chance (for the most part) that you'll get an error from deep in the program that you can't easily handle.

Forcing you to handle them everywhere and anywhere forces error handling to be a part of your architecture.


Erlang took this other way around by designing a system that enable you to not handle all these errors.

I am more from this school of designing a system around the reality insteas of trying to patch it everywhere, praying we have enough fabrics to catch it all.

But it would meam rethinking how we build stuff. That was not at all a goal of Go.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: