Front page | perl.perl6.language |
Postings from April 2002
Re: Unary dot
Thread Previous
|
Thread Next
From:
Melvin Smith
Date:
April 10, 2002 19:47
Subject:
Re: Unary dot
Message ID:
5.1.0.14.2.20020410223927.02b00e18@pop.mindspring.com
At 04:01 PM 4/10/2002 -0600, Luke Palmer wrote:
> > > $.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.
>
>Or is there some reason this wouldn't work?
I totally agree here. The common case is going to make code
look ugly with $.foo everywhere. Please don't let this come into being. :(
I think it is arguable that a closure is a class for a subroutine object,
and in subs we will still use my $foo for lexicals. However we must
remember in class scope to use $.foo for the default, instance variable,
and a normal $foo for the less typical static or class variables.
Yucky.
Reserve the ugly syntax for the less common case.
Pleeeease.
-Melvin
Thread Previous
|
Thread Next