On Thu, Apr 10, 2008 at 03:41:19PM -0500, John M. Dlugosz wrote:
> I've consolidated all the discussion into one reply:
>
>
> >> The perldocs call them "Five specially named code blocks", The Camel
> names them individually (e.g. BEGIN block). How about phase blocks? They
> control in what phase of compilation/runtime the code runs in.
>
>>> >> I don't know, "phase" sounds too specific to me. Does the catching of
>>> >> an exception really bring us into a new phase of execution? What about
>>> >> the LAST time through a loop? etc.
>
>
> An exception is certainly a phase-change. Last time through a loop? Well,
> context anyway, if not phase, unless phase means "stage" in this instance.
> Hmm, I'm starting to talk like Larry. Bad John.
You're just going through a stage that I'm stuck in. :)
> >> Well, lessee. The Common Lisp spec calls them "situations" in the
> definition of (eval-when)...
That's not bad. Other languages call them "ON" blocks and such.
> OK, so people already want to say "The BEGIN block". So the set of them
> are "The XXX blocks" where XXX is the collective name for those keywords.
> Beware of these words as they already convey meaning or connotation:
> event trait ... ?
>
> Perhaps the concept of "phase"/"stage" needs to be described in detail as
> well, in and of itself. Then the same term can be used.
>
> In C++ there are "phases of translation" (or is it "stages"?). We already
> refer to compile-time vs run-time, sometimes CHECK time etc. so we need a
> name for that semantic category. Cue the thesaurus...
>
> "episode" makes my short list. An incident in the course of a series of
> events... an incident within a narrative usually fully developed and either
> integrated within the main story or digressing from it. An intermediate or
> digressive passage. A portion of a narrative that relates an event or a
> series of connected events and forms a coherent story in itself. A passage
> between statements of a main subject or theme, as in a rondo or fugue.
> Those all have allegories with the work of the Perl implementation. CATCH
> relates an event and forms a coherent story in itself. BEGIN, CHECK, INIT
> etc may be portions of the overall series of events, or chapters if you
> will. But a block that is written among the lines of the main code but put
> elsewhere for execution is "a passage between statements of a main
> subject."
Not sure I like the stage/phase/chapter metaphor, really. Too static.
On the other hand, situation seems to convey more ad hoc-ness than
strictly necessary.
> "exigency" is interesting, but hang on to that for exception handling and
> continuations.
or "contingency".
An offline correspondent offers:
"event handler blocks"
"event handlers"
"handler blocks"
"handlers"
Maybe FOO {} is a handler block, and FOO is just the "handle"
for the handler...10-4 good buddy?
Larry