News for hackers. Stuff that matters.
Re:Toward Go 2 by hdhzy on Thursday July 13, 2017 @03:32PM (#14764417)
So... Just like checked exceptions in Java?
Re:Toward Go 2 by imsofuture on Thursday July 13, 2017 @04:40PM (#14764990)
Yes, it's somewhat similar in that the compiler checks if you have handled or chosen not to handle an error. You're not allowed to ignore it (through omission).
Re:Toward Go 2 by baq on Thursday July 13, 2017 @05:24PM (#14765382)
yeah but better because you don't break the world if you add a new exception to a public method.
Re:Toward Go 2 by concede_pluto on Thursday July 13, 2017 @11:47PM (#14767311)
Declaring that every method throws Exception doesn't break the world any more than every Go function returning an argument of type error. You're intentionally saying pretty much anything could go wrong and nobody can plan ways to recover.