Checked vs unchecked exceptions

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 6 04:01:26 PDT 2017


Am Thu, 06 Jul 2017 01:31:44 +0000
schrieb Moritz Maxeiner <moritz at ucworks.org>:

> But to be clear (and the title and description of any DIP 
> addressing this should reflect this):
> These are not checked exceptions, because checked exceptions 
> would require bar to declare its exception set manually.

Yep, absolutely clear. Just like "auto a = 1" does not declare
a variable as we all know declarations start with a type.
Instead of defining checked exceptions how it bests fits all
your posts in this thread, why not say "Checked exceptions as
implemented in Java were a good idea, had they allowed the
compiler to infer them where possible."
Of course we can still call those inferred checked exceptions
something else. ;o)

-- 
Marco



More information about the Digitalmars-d mailing list