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

And Go lets you do that. You just return the error.

Try writing a few things in Go. I very much doubt you'll respond like this afterwards.




So I assume it has multiple returns? Some smart built in error class I could actually see that removing the need for exceptions, yes.

One new way I've found interesting in obj c is giving functions (an) error handling block argument(s). It nicely does what java unhandled exceptions warnings do: make the user aware of his actions.


Yes, it can return a tuple, in Python-speak, and has a pre-declared error type. http://golang.org/ref/spec#Errors




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

Search: