scope() statements and return

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 4 23:01:26 PDT 2014


On Sat, 04 Oct 2014 14:48:26 -0700
Andrei Alexandrescu via Digitalmars-d <digitalmars-d at puremagic.com>
wrote:

> There's no interesting way to check this because functions don't list 
> the exceptions they might throw (like Java does). -- Andrei
sure there is no way to check. this 'final try' helper is required
exactly 'cause compiler can't do necessary checks, and programmer can
assure compiler that "it's ok, we'll catching 'em all here!" this way
'try/catch' will not be "nothrow", only 'final try/catch'. and there
will be *nothing* that can be catched outside of 'final try/catch'.
i.e. if something was not catched in 'final', it's a fatal bug.
crash-boom-band, we are dead.

but i don't want to create ER, 'cause it will be rejected. it implies
code breaking ("simple" try/catch can't be used in 'nothrow' functions
anymore), and ERs with code breaking feature have no chances.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141005/01da356f/attachment.sig>


More information about the Digitalmars-d mailing list