develooper Front page | perl.perl6.language | Postings from April 2002

Re: Unary dot

Thread Previous | Thread Next
From:
Piers Cawley
Date:
April 10, 2002 21:33
Subject:
Re: Unary dot
Message ID:
m23cy226vd.fsf@bofh.org.uk
Luke Palmer <fibonaci@babylonia.flatirons.org> writes:

>> >     $.foo
>> 
>> It's already defined as an instance variable.
>  
> I don't think I like that. Instance variables are far more common that 
> class variables, so why not just $foo, and you could  use a compile-time 
> property for class variables. Like C<is private> as discussed. That or 
> C<is static>. I think the latter makes more sense.

Ah, but I think the mnemonic value of the '.' more than earns its keep
here. C<our $foo is private> is doing a slightly different job
anyway. And instance variables are *not* the same as 'normal'
variables, they hang off a different symbol table (or syte, to use
Damian's oh so clever term from Perl 5+i) and I'm all for things that
are different *looking* different.

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?


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