[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Features you would like to see
- From: David Given <dg@...>
- Date: Wed, 22 Aug 2007 00:50:14 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Mark Hamburg wrote:
> The Scheme answer is that you get to return again from handleClicksOn.
What does that do? The closure's already has a dynamic chain (it's been called
from somewhere). If you return to the original method, don't you end up
abandoning that entire dynamic chain and cloning the one you had originally
when the closure was created? Which, presumably, has all kinds of stale state
and will do generally unuseful things...
> I think the Dylan answer is that it's an error and Dylan presumably throws
> an exception. Yes, you can argue that it isn't the fault of the call chain
> that led to the block being called and trying to return, but to the extent
> that an exception means "someone tried to do something they shouldn't" --
> e.g., index a number -- this is an appropriate use for exceptions.
That's true; however, this particularly exception is of the kind that is
metaphorically subclassed from ProgrammerScrewedUpException, which shouldn't
really happen. I can't really see much that it's possible to do usefully at
this stage --- since the programmer's screwed up, you don't even know that
your application's internal state is viable any more, so even doing something
like saving the document and shutting down is questionable.
(Although if your application was database-oriented, then abandoning the
current transaction and terminated would be entirely viable. Hmm.)
┌── ｄｇ＠ｃｏｗｌａｒｋ．ｃｏｍ ─── http://www.cowlark.com ───────────────────
│ "There does not now, nor will there ever, exist a programming language in
│ which it is the least bit hard to write bad programs." --- Flon's Axiom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----