develooper Front page | perl.perl6.language | Postings from June 2001

Re: $foo.Foun (was Re: Properties and stricture)

Thread Previous | Thread Next
From:
Damian Conway
Date:
June 5, 2001 20:53
Subject:
Re: $foo.Foun (was Re: Properties and stricture)
Message ID:
200106060353.NAA42577@indy05.csse.monash.edu.au
 
   > Consider the code:
   > 
   >     my $foo = 1 is Found;
   >     &bar($foo);
   > 
   >     sub bar { my $baz = shift; if ($baz.Found) { ...} }
   > 
   > Does the value of $baz have the Found property?

Yes.

   > If so, does the compiler know that?

No. Because it only has the property at run-time.

Damian

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About