[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl][off topic] local & my (was Re:Any way to Tee...)



Since we're off topic I thought I'd mention another programming language...
and old fave of mine called Pop-11. Pop went through the addition of
lexically scoped variables in a similar way to the Perl4->Perl5 change.
Many of the same confusions on the meanings of local/global came up.
However the problems were eased by two word choices. One deliberate, one
accidental.

The accidental one was that the variable declaration/localisation keyword
for global vars (in the perl sense) was "vars" rather than "local" so there
wasn't that confusion.

The non-accidental one was that the descriptive name for the non-lexically
scoped vars was changed (from "dynamic") to "permanant". For me, anyway,
"permanant variable" gets across the concept more clearly than "global" and
was an inspired choice (by the very clever John Gibson if my memory serves).

For anyone interested in Pop-11, still a pretty cool language, check out
<http://www.cogs.susx.ac.uk/users/adrianh/pop11.html>.

Enough.... I promise to answer a MacPerl related question next time ;-)

Cheers,

Adrian



At 7:32 pm +0000 18/2/98, Chris Nandor wrote:
>At 14.19 1998.02.18, Mark Manning/Muniz Eng. wrote:
>>For my part I'm now having to go back through some of the
>>routines I built in Perl 4.0 and make sure the local
>>commands are not causing problems because I thought that
>>the LOCAL command was truly local.  :-)
>
>The general rule of thumb is DO NOT ever use local unless you specifically
>want to save and later restore the value of a global variable.
>
>Have fun,
>
>--
>Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
>%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
>#==               New Book:  MacPerl: Power and Ease               ==#
>#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#
>
>
>
>***** Want to unsubscribe from this list?
>***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch


----
Adrian Howard. adrianh@victoriareal.co.uk. Head Techie. Victoria Real Ltd
URL: http://www.victoriareal.co.uk/ v. +44 1273 774469 f. +44 1273 779960



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch