As I read it, the original question was about the actual keyword -
e.g. the word "BEGIN" - as distinct from the block it's attached to.
Though I agree we need a general term for the latter, the name "event
block" seems to imply that "BEGIN" et al are events, which might be ok
or might cause confusion with more thoroughly event-driven programming
models.



On 4/10/08, Larry Wall <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 10, 2008 at 08:52:38AM -0700, jerry gay wrote:
> : On Wed, Apr 9, 2008 at 10:31 PM, John M. Dlugosz
> : <[EMAIL PROTECTED]> wrote:
> : > Consider the words that may be used to introduce a block for a special
> : > purpose, like
> : >
> : >  BEGIN
> : >  END
> : >  INIT
> : >  CATCH
> : >  etc.
> : >
> : >  What do you call those?  They are not even "special named blocks"
> because
> : > that is not the block name (that already means something).
> : >
> : syntactically speaking, http://svn.pugscode.org/pugs/src/perl6/STD.pm
> : groups them in <statement_control>, just like 'if' and 'for'.
> : semantically speaking, i don't have a clever or unique name for them,
> : other than what larry has already come up with.
>
> It's a really good question, particularly because it's so exposed to the
> user, so it needs to be something not too unwieldy.  Semantically, they
> are closures that are attached as properties of the surrounding lexical
> scope, and since they're compile-time properties, they're declarative.
> So we've been calling them closure traits.  But I pretty certain we
> should be using the term "block" here instead, even though they are
> technically closures (or potentially closures, depending on how you
> define that).  But people will generally prefer the more concrete
> "block" if there are always curlies involved, and people are already
> used to saying "BEGIN block" and such.
>
> And "traits" is also problematic; it says what they are, but not really
> what they do.  They're really "come froms" with predefined names that
> are automatically called at the appropriate time.  So I think perhaps
> the best term for them might be something more like "event blocks",
> blocks that are called if and when a particular event happens.  That's
> a more user-oriented definition.
>
> Larry
>

-- 
Sent from Gmail for mobile | mobile.google.com

Mark J. Reed <[EMAIL PROTECTED]>

Reply via email to