Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Nathan Wiger
Dammit, I got the example exactly backwards. Try this: >$Foo is true; >$Foo = 0; >print "Stuff" if $Foo; # *WOULD* print - "is" assigns a > # permanent "true" property > >$Foo as true = ""; >$Foo = 0; >print "Stuff" if $Foo; # *

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Dave Storrs
On Fri, 18 May 2001, Nathan Wiger wrote: > Maybe there are two different features being conflated here. First, we > have "is", which is really for assigning permanent properties: >my $PI is constant = '3.1415927'; > So, those make sense, and we'd want them to remain through assignment. >

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Buddha Buck
At 01:34 PM 05-18-2001 -0700, Nathan Wiger wrote: >Dammit, I got the example exactly backwards. Try this: > > >$Foo is true; > >$Foo = 0; > >print "Stuff" if $Foo; # *WOULD* print - "is" assigns a > > # permanent "true" property > > > >$Foo as

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Trond Michelsen
On Fri, May 18, 2001 at 01:34:55PM -0700, Nathan Wiger wrote: > Dammit, I got the example exactly backwards. Try this: >>$Foo is true; >>$Foo = 0; >>print "Stuff" if $Foo; # *WOULD* print - "is" assigns a >> # permanent "true" property Sorry to ju

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Larry Wall
I've seen uses for compile-time properties on variables, and run-time properties on values, but I've not yet seen any decent use for run-time properties on variables. So I'd be inclined to disallow properties on lvalues unless they're in a "my" or "our". Offhand, I do kinda like the notion of di

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Jarkko Hietaniemi
Maybe I missed it... but what is the relationship of (Perl 5) attributes and Perl 6 properties? my $answer : constant = 42; my $answer is constant = 42; my sub ... dang, no lexical subs, but can we please have them in Perl6? :-) sub terfuge : loc

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Bart Lateur
On Fri, 18 May 2001 23:26:53 +0200, Trond Michelsen wrote: >While I understand how "0 but true" is a cute hack that is destined to >be replaced by a truth property, I fail to realize how it's useful to >have a value that's true no matter what value you assign to it later. I thought the "truth" p

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Damian Conway
Bart wrote: > >While I understand how "0 but true" is a cute hack that is destined to > >be replaced by a truth property, I fail to realize how it's useful to > >have a value that's true no matter what value you assign to it later. > > I thought the "truth" property was attached t

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

2001-05-18 Thread Larry Wall
Jarkko Hietaniemi writes: : Maybe I missed it... but what is the relationship of (Perl 5) attributes : and Perl 6 properties? : : my $answer : constant = 42; : my $answer is constant = 42; : : my sub ... dang, no lexical subs, but can we please have them : in Perl6? :-)