Re:Help me sort out the meaning of “{}” as a constructor arg...
by flukus on Wednesday November 23, 2016 @05:52PM
(#13026446)
Yeah it's similar in that sense, but checked exceptions force you to acknowledge every type of exception that can be thrown, or one generic one. If you can't handle it then they force you to list every type of exception that can be thrown all they way up the chain.
Like in Go I can do:
I am then free to ignore err or do something with it, but the type system forces me to at least acknowledge that it exists. It's the "compiler forces you to acknowledge the possibility of an error" that makes them pretty similar to checked exceptions in my opinion.