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? :-)
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
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
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
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
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
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
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.
>
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; # *
* Michael G Schwern <[EMAIL PROTECTED]> [05/18/2001 12:32]:
> Let me see if I understand this...
>
> $Foo is true;
>
> # Meanwhile, in another part of the city...
>
> $Foo = 0;
> print "My spider sense is tingling" if $Foo;
>
> Does that print or not?
Maybe there are two different fea
10 matches
Mail list logo