At 10:34 AM -0800 3/24/03, Larry Wall wrote:
On Mon, Mar 24, 2003 at 12:05:13PM -0600, Jonathan Scott Duff wrote:
: On Mon, Mar 24, 2003 at 09:34:23AM -0800, Larry Wall wrote:
: > The purpose of a state variable is to keep state across multiple calls
: > to the same scope, so I'd say the proper semantics on closures is
: > to treat the generation of a closure as a new block with new state properties.
: > The most useful initialization semantics appear to be "just in time",
: > that is, on first actual call to the generated closure. START time
: > in my previous message, though I'm still unhappy with that name.
: > FIRST would be better, but that's taken (this week).
:
: ENTER? Possibly with a corresponding LEAVE?


Er, how would LEAVE detect that this was the *last* time you're ever
going to call this routine?

The only thing I can think of is to map it to the closure's DESTROY method and call it when the closure gets GC'd.


On the other hand, if we renamed FIRST and LAST to ENTER and LEAVE,
then FIRST would become available to mean "my very first time"...

Ahem. Let us not dwell on the Freudian aspects of all this...

Put down that cigar, Larry... -- Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to