Matt Sergeant wrote:
> 
> [I might join perl6-language some day, but until then, please CC me on all
> Time::Object related messages]
> 
> <Original from="Bart Lateur">
>  On Wed, 2 Aug 2000 08:14:22 +0100 (BST), Matt Sergeant wrote:
> 
> >I used to be a C programmer myself (well OK, I was a C++ programmer...),
> >but I'd rather any day type "localtime->year" than "(localtime)[5]".
> 
>       And what would you type instead of
> 
>               (localtime)[3, 4, 5]
> 
>       ? localtime->(day, month, year) ?
> </Original>
> 
> <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.

Hildo

Reply via email to