4 ms·
We should set the syntax as "try... catch" and call the feature "exceptions". It will be revolutionary for Go.
by melony 4y ago
We should set the syntax as "try... catch" and call the feature "exceptions". It will be revolutionary for Go.
- dehrmann 4y ago
- doctor_eval 4y agoBut that’s the opposite of what Go did. I think they always knew generics were important, but it just took ages to come up with a design that was satisfactory. Compare to Java, whose generics had so many compromises (type erasure) that I hated them. I really don’t think a quality gate is a problem, even if it’s sometimes inconvenient.
- XorNot 4y agoI do have a lot of trouble figuring out how Go's error handling is meaningfully different in user experience here. Errors as values seems to sound better in theory then in practice, since in practice everything is type Error, and then I either expect enough from the error to do something about it, or I don't. Which... Is exactly how I use exceptions in Python, replete with mostly having no idea what will get thrown. But Go makes it somewhat worse because most "error values" are just formatted strings, not actual types.
- grey-area 4y agoNo thanks, exceptions are awful.