On Monday, September 2, 2002, at 03:44  AM, Damian Conway wrote:

>> my Date $date .= new('Jun 25, 20002');
>
> Hmmmm. That's a very interesting idea.
> I like it.

Looks pretty groovy to me too.  It looks like the .=
operator, no longer being employed as a string appender, 
now means "use the class I just mentioned".  

If so, perhaps it would only be a small step further for
it to also mean "and if I don't give the name of the method,
use new_from_[class of object being passed]". So, the following code
would call Date::new_from_String, passing 'Sep 21, 1963' as the
sole argument:

        my Date $date;
        $date .= 'Sep 21, 1963';

The Perl golfers will love it.  It's almost as concise as the original
idea, w/o the ambuguity of what ought to be assigned (the string or a new
object). It shouldn't slow things down, either, because the determination
of the argument's class could be determined at compile time. 

-Miko

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


Reply via email to