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

Re: properties

Thread Previous | Thread Next
From:
Edward Peschko
Date:
May 21, 2001 11:56
Subject:
Re: properties
Message ID:
20010521115624.A9731@excitehome.net
On Mon, May 21, 2001 at 08:57:45AM +0100, Graham Barr wrote:
> On Sun, May 20, 2001 at 01:24:29PM +0100, Simon Cozens wrote:
> > On Sun, May 20, 2001 at 12:46:35AM -0500, Jonathan Scott Duff wrote:
> > > 	my $a is true = 0;		# variable property
> > > 	my $a = 0 is true;		# variable property
> > > 	my ($a) = 0 is true;		# value property
> > 
> > Wow. Totally ETOOCONFUSING.
> 
> That has been exactly my thought as I have been reading this thread.
> 
> I have been trying to think what properties would make sensible variable
> or value properties.
> 
> So far all I can think of for variable properties are actually compile time
> properties like constant etc.
> 
> So I am left wondering how much of an issue this really will be ?
> 

Well that's the reason I think that they shouldn't be two separate things, and
that one should suffice.

And note that constants can be implemented in terms of run-time properties:
assign the constant run-time property the additional effect of dying/warning
if in fact the constant property is going away. ie:

my $variable = 0 is constant;
$variable = 1; # warn/and or die after variable tries to overwrite constantness.

Ed

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