On Thu, 3 Aug 2000, Hildo Biersma wrote:

> > <Reply>
> > I'd either leave that as (localtime)[3,4,5] (please read the man page for
> > Time::Object), or understand that there's absolutely no need to separate
> > off the variables like that in an object oriented interface:
> 
> Ah, but we could make the language support this:
>  
>   localtime->{'day', 'month', 'year'}
> 
> in hash-slice fashion.  If functions could distinguish between
> 'wantarray' and 'wanthahs' this would be easy to do.  And certainly, for
> all the getpwXXX and getnetXXX functions, it seems like the right
> apporach to me.

Define a use case, and I might be more interested. But to me theres
absolutely nothing you've specified that really isn't in the language
right now. In fact I could export some constants from Time::Object so that
you can go:

(localtime)[DAY, MONTH, YEAR];

I'd be interested also in a language extension that allowed you to remove
the parens from that expression: localtime[DAY, MONTH, YEAR] (and see the
same sort of thing apply to stat() too), but that has been mulled over
several times on p5p and I think the general consensus is that its too
hard to parse and even *more* context sensitive than before - something I
thought we were supposed to be thinking very carefully about in this
re-write.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org

Reply via email to