"David L. Nicol" wrote: > We could even define a new line noise variable which could hold the > results of the last name-of-function subroutine that was not invoked > as an rvalue (I nominate $__ ); make such an invokation a warning-level > offense; and make $__ visibility/localization compatible with recursion. To answer my own question, the thing I found annoying about the syntax when it was shown to me was that it seemed to break portability: you can't cut from a function called A that returns something by assigning to A and paste into a function called B to get the same functionality. So a way to have the feature (direct assignment to external lvalue) and maintain portability might be to forget about magic names and just make the new LNV (which I am calling $__ in this thread) mean "An alias for the L-value of what the subroutine return value will get assigned to, or ${undef} if we're not invoked as an R-value." so ${undef} gets autolocalized if used.
- assign to magic name-of-function variable instead of "... David L. Nicol
- Re: assign to magic name-of-function variable instead ... Peter Scott
- Re: assign to magic name-of-function variable instead ... John Porter
- Re: assign to magic name-of-function variable instead ... Branden
- Re: assign to magic name-of-function variable instead ... David L. Nicol
- Re: assign to magic name-of-function variable instead ... James Mastros
- Re: assign to magic name-of-function variable instead ... John Porter
- Re: assign to magic name-of-function variable instead ... David L. Nicol
- Re: assign to magic name-of-function variable instead ... abigail
- Re: assign to magic name-of-function variable instead ... James Mastros
- Re: assign to magic name-of-function variable inst... David L. Nicol
- Re: assign to magic name-of-function variable instead ... Johan Vromans
- Re: assign to magic name-of-function variable instead ... James Mastros
- Re: assign to magic name-of-function variable instead ... Bart Lateur