Re: Nomenclature Question - BEGIN etc.
How about 'contingent blocks', because they are contingent on some event, without having to use the word 'event'. Richard TSa wrote: HaloO, Larry Wall wrote: Hmm, maybe control event blocks and control events, then... I would call them flow blocks because this is where they are called and what they influence: the flow of execution. This nicely matches the flow charts used to describe the control flow. The other term I would thing is synonymous to flow is stream. But that's already taken for event stream, data stream and implies linearity whereas flow naturally implies branching. The third term I come up with is context blocks. But context in Perl 6 is something very different. Regards, TSa.
Re: Nomenclature Question - BEGIN etc.
HaloO, Larry Wall wrote: Hmm, maybe control event blocks and control events, then... I would call them flow blocks because this is where they are called and what they influence: the flow of execution. This nicely matches the flow charts used to describe the control flow. The other term I would thing is synonymous to flow is stream. But that's already taken for event stream, data stream and implies linearity whereas flow naturally implies branching. The third term I come up with is context blocks. But context in Perl 6 is something very different. Regards, TSa. -- The Angel of Geometry and the Devil of Algebra fight for the soul of any mathematical being. -- Attributed to Hermann Weyl
Re: Nomenclature Question - BEGIN etc.
JMD Consider the words that may be used to introduce a block for a special JMD purpose, like JMD JMD BEGIN JMD END JMD INIT JMD CATCH JMD etc. JMD JMD What do you call those? Well, lessee. The Common Lisp spec calls them situations in the definition of (eval-when)... JMD They are not even special named blocks because JMD that is not the block name (that already means something). Now you've lost me. I was pretty sure that was the block name. AIUI, you can give arbitrary names to any block, and these names function the same way (i.e. can be used in flow control statements), but they also happen to control when the block is actually evaluated. CO The perldocs call them Five specially named code blocks, The Camel CO names them individually (e.g. BEGIN block). How about phase blocks? CO 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. -- Mark J. Reed [EMAIL PROTECTED]
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 2:16 AM, Mark J. Reed [EMAIL PROTECTED] wrote: JMD Consider the words that may be used to introduce a block for a special JMD purpose, like JMD JMD BEGIN JMD END JMD INIT JMD CATCH JMD etc. JMD JMD What do you call those? Well, lessee. The Common Lisp spec calls them situations in the definition of (eval-when)... JMD They are not even special named blocks because JMD that is not the block name (that already means something). Now you've lost me. I was pretty sure that was the block name. AIUI, you can give arbitrary names to any block, and these names function the same way (i.e. can be used in flow control statements), but they also happen to control when the block is actually evaluated. CO The perldocs call them Five specially named code blocks, The Camel CO names them individually (e.g. BEGIN block). How about phase blocks? CO 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. -- Mark J. Reed [EMAIL PROTECTED] It looks like they already have a name in S04: Closure traits*. * http://dev.perl.org/perl6/doc/design/syn/S04.html#Closure_traits -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 2:26 AM, Chas. Owens [EMAIL PROTECTED] wrote: It looks like they already have a name in S04: Closure traits*. * http://dev.perl.org/perl6/doc/design/syn/S04.html#Closure_traits I don't know, it seems like any value might happen to both be a closure and have traits, which aren't necessarily these particular ones... -- Mark J. Reed [EMAIL PROTECTED]
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 2:29 AM, Mark J. Reed [EMAIL PROTECTED] wrote: On Thu, Apr 10, 2008 at 2:26 AM, Chas. Owens [EMAIL PROTECTED] wrote: It looks like they already have a name in S04: Closure traits*. * http://dev.perl.org/perl6/doc/design/syn/S04.html#Closure_traits I don't know, it seems like any value might happen to both be a closure and have traits, which aren't necessarily these particular ones... snip How about Control Closure then? -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.
Re: Nomenclature Question - BEGIN etc.
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. ~jerry
Re: Nomenclature Question - BEGIN etc.
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
Re: Nomenclature Question - BEGIN etc.
Mark J. Reed markjreed-at-mail.com |Perl 6| wrote: Now you've lost me. I was pretty sure that was the block name. AIUI, you can give arbitrary names to any block, and these names function the same way (i.e. can be used in flow control statements), but they also happen to control when the block is actually evaluated. I might have misremembered, but i thought labels were followed by a colon in Perl 6. A quick scan of the docs... It is illegal for a provisional subroutine call to be followed by a colon postfix, since such a colon is allowed only on an indirect object, or a method call in dot form. (It is also allowed on a label when a statement is expected.) ... foo:# label -- must be label at statement boundary. -- ILLEGAL otherwise foo: bar: # two labels in a row, okay
Re: Nomenclature Question - BEGIN etc.
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]
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 01:35:57PM -0400, Mark J. Reed wrote: : 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. Hmm, maybe control event blocks and control events, then... Larry
Re: Nomenclature Question - BEGIN etc.
On Apr 10, 2008, at 13:29 , John M. Dlugosz wrote: I might have misremembered, but i thought labels were followed by a colon in Perl 6. A quick scan of the docs... It is illegal for a provisional subroutine call to be followed by a colon postfix, since such a colon is allowed only on an indirect object, or a method call in dot form. (It is also allowed on a label when a statement is expected.) ... The last sentence there implies that a label can exist *without* a colon. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 04:38:27PM -0400, Brandon S. Allbery KF8NH wrote: On Apr 10, 2008, at 13:29 , John M. Dlugosz wrote: I might have misremembered, but i thought labels were followed by a colon in Perl 6. A quick scan of the docs... It is illegal for a provisional subroutine call to be followed by a colon postfix, since such a colon is allowed only on an indirect object, or a method call in dot form. (It is also allowed on a label when a statement is expected.) ... The last sentence there implies that a label can exist *without* a colon. I think the intent there is to say that a label is only allowed at the start of a statement, not that a label can have a : left off. -ryan
Re: Nomenclature Question - BEGIN etc.
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. Well, lessee. The Common Lisp spec calls them situations in the definition of (eval-when)... Good pointer, not just for the name candidate, but to look at another formal spec to help clear up details. If they've already been thought out, steal it. It looks like they already have a name in S04: Closure traits I don't know, it seems like any value might happen to both be a closure and have traits, which aren't necessarily these particular ones... My feeling exactly. 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. Hmm, maybe control event blocks and control events, then... How about Control Closure then? 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 ... But I pretty certain we should be using the term block here instead, ... 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. ... 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. 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. exigency is interesting, but hang on to that for exception handling and continuations. --John
Re: Nomenclature Question - BEGIN etc.
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
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 5:00 PM, Larry Wall [EMAIL PROTECTED] wrote: Well, lessee. The Common Lisp spec calls them situations in the definition of (eval-when)... That's not bad. Oh, sure, ignore it when I first said it, but let John quote me and allasudden it's notable.. :-) 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? The handler idea is interesting. As a sort of self-countering response to my earlier objection about event-orientedness, I note that Applescript treats user-defined subroutines as just a special case of event handlers, where the triggering event is a call to the routine. So maybe talking about BEGIN and friends the same way is not so wacky. I don't know about handle for the keyword, though. It's awfully overloaded in programming. For instance, does Perl6 still have FILEHANDLES? Something keeps making me think of the {SG,H,X}ML terminology of elements with tags. I don't think element fits here, but tag for the keyword feels right to me. We could just call them tagged blocks, but that's a syntactic description, which fails to convey anything about the semantics. So maybe event tags and event blocks, with the combination of the two constituting an event handler? Also: a CB reference? Really? (Y)our age is showing. :) -- Mark J. Reed [EMAIL PROTECTED]
Re: Nomenclature Question - BEGIN etc.
From: Larry Wall [EMAIL PROTECTED] Date: Thu, 10 Apr 2008 14:00:53 -0700 On Thu, Apr 10, 2008 at 03:41:19PM -0500, John M. Dlugosz wrote: Well, lessee. The Common Lisp spec calls them situations in the definition of (eval-when)... That's not bad. FWIW, eval-when only does BEGIN and INIT; CATCH, LEAVE, etc. are handled by other special forms. Other languages call them ON blocks and such. AFAIR, only languages that use ON as the keyword to introduce them. 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 . . . 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. . . . Larry How about daemon blocks? That suggests to me that they are invoked as required, and not necessarily in synchrony with their containing blocks. -- Bob Rogers http://rgrjr.dyndns.org/
RE: Nomenclature Question - BEGIN etc.
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark J. Reed Sent: Thursday, April 10, 2008 4:26 PM To: [EMAIL PROTECTED]; perl6-language@perl.org Subject: Re: Nomenclature Question - BEGIN etc. but tag for the keyword feels right to me. We could just call them tagged blocks, but that's a syntactic description, which fails to convey anything about the semantics. So maybe event tags and event blocks, with the combination of the two constituting an event handler? Perhaps event match block ? - Hugh Miller e-mail: [EMAIL PROTECTED]
Re: Nomenclature Question - BEGIN etc.
On Apr 10, 2008, at 18:58 , Bob Rogers wrote: From: Larry Wall [EMAIL PROTECTED] Date: Thu, 10 Apr 2008 14:00:53 -0700 On Thu, Apr 10, 2008 at 03:41:19PM -0500, John M. Dlugosz wrote: Well, lessee. The Common Lisp spec calls them situations in the definition of (eval-when)... That's not bad. FWIW, eval-when only does BEGIN and INIT; CATCH, LEAVE, etc. are handled by other special forms. On the other hand, that may be the answer right there: when-blocks. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 7:41 PM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On the other hand, that may be the answer right there: when-blocks. We have those already: given...when. -- Mark J. Reed [EMAIL PROTECTED]
Re: Nomenclature Question - BEGIN etc.
My suggestion: consequential blocks -- Met vriendelijke groet, Kind regards, Korajn salutojn, Juerd Waalboer: Perl hacker [EMAIL PROTECTED] http://juerd.nl/sig Convolution: ICT solutions and consultancy [EMAIL PROTECTED]
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 8:49 PM, Juerd Waalboer [EMAIL PROTECTED] wrote: My suggestion: consequential blocks ...which would make other blocks inconsequential? Nuh-uh. -- Mark J. Reed [EMAIL PROTECTED]
Nomenclature Question - BEGIN etc.
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). --John
Re: Nomenclature Question - BEGIN etc.
On Thu, Apr 10, 2008 at 1:31 AM, 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). snip 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. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.