On Wed, Apr 25, 2001 at 08:33:33AM -0400, Stephen P. Potter wrote:
> How about symbolic refs to function names?
> 
> $a = $x ? "hop" : "skip";
> $b = $y ? "scotch" : "soda";
> 
> $a.$b;        # call one of hop.scotch, skip.scotch, hop.soda, skip.soda

5.005_03 and under required parens after the method reference

        $obj->$meth_name();

5.6.0 appears to have removed that requirement, but I don't see why
that couldn't be required again in Perl 6 to disambiguate if needed.


> | Alternately, we can overload . to do a deref on (blessed?) references, and
> | concat otherwise.
> 
> I think this would lead to hard to find bugs when someone mispelled
> something.

I think it would also throw Dan into convusive fits.  Additionally, it
would make finding method calls lexically near impossible.  I'd like
to keep Perl 6 refactorable as much as possible.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
BOFH excuse #356:

the daemons! the daemons! the terrible daemons!

Reply via email to