[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Are STOP and INIT good names? (was Re: [PATCH pod/perlmod.pod 5.005_63] Special Blocks For Less Than Gurus)



Gurusamy Sarathy <gsar@ActiveState.com> writes:
|| 
|| On Wed, 26 Jan 2000 09:31:33 +1100, Damian Conway wrote:
|| >   > I like DONE (as in "done with compilation"), which hasn't been
|| >   > proposed yet, and which conveys the meaning that these things are
|| >   > a finishing point for compilation, not a starting point for
|| >   > execution (which is what INIT is).
|| >   > 
|| >   >     BEGIN
|| >   >     DONE
|| >   >     INIT
|| >   >     END
|| >
|| >Hmmmm. To me the obvious order of these is:
|| >
|| >        BEGIN
|| >        INIT
|| >        DONE
|| >        END
|| 
|| Sorry, I don't see why this is any more obvious than the other, or
|| something else like:
|| 
||          INIT
|| 	 BEGIN
|| 	 END
|| 	 DONE
|| 
|| But as you said, I probably know too much. ;-)

Either of the last two seems reasonable, but the first does not make
sense.  It has a synonym for completion preceeding a synonym for
preparation.  Only the internals steeped few who will understand.

I somewhat liked the proposal of PREPARE to mean a subroutine whose
job was to prepare.  To some extent, though, BEGIN/PREPARE/INIT are
all synonyms with no inherent relative order to them.  (But there isn't
an "obvious" order that is wrong like DONE/INIT would have.)

|| Now, it just so happens that you can ignore DONE and pretend that it
|| is a "single flow of control", but it sure ain't like that.  I think
|| it is counter-productive to perpetuate that myth by choosing names
|| that "fit in" with the myth.
|| 
|| I wish we could do PARSE::BEGIN, PARSE::END, RUN::BEGIN, and END::RUN
|| (or even {BEGIN,END}::{PARSE,RUN}).  Maybe that's what we oughtta
|| do.

I like the {BEGIN,END}::{PARSE,RUN} idea; especially with Damian's
backward compatibility addition that BEGIN is equivalent to
BEGIN::PARSE, END is END::RUN, and INIT is BEGIN::RUN.

--
John Macdonald     jmm@jmm.pickering.elegant.com


Follow-Ups from:
Gurusamy Sarathy <gsar@ActiveState.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]