in reply to Re: Re: Re (tilly) 2: Comprehending Binary :=
in thread Comprehending Binary :=

Is this a use beyond simply saving keystrokes, or did I misunderestimate what you wrote?
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print
  • Comment on (MeowChow) Re6: Comprehending Binary :=

Replies are listed 'Best First'.
Re: (MeowChow) Re6: Comprehending Binary :=
by TheDamian (Vicar) on Oct 08, 2001 at 08:06 UTC
    No, we're not just saving keystrokes here. We're saving repeated calls to the lvalue method. And, even though method calls in Perl 6 will be faster, not doing any calls in the loop is still a real saving if the loop iterates many times.

    Damian

      So at what point does the lvalue method get called, once $thresh goes out of scope, or once the object is accessed, or at some other time?
         MeowChow                                   
                     s aamecha.s a..a\u$&owag.print
        If I understand correctly, you can think of it as roughly akin to a lexical glob assignment. So the lvaluable (lvalued?) method is called on each assignment to $thresh. The moon stays the same, but there are several fingers, each with a different name.