> What is:
>
> $x = date();
>
> going to return?
Probably the current scalar context result (i.e. a date string)
> An object that has many different -ify methods:
> stringify
> numify
> hashify
> listify
> objectify (!)
Possible, but blech.
> How then does this work?
>
> somesub( date() );
Usually list context, so usually returns list.
> Depends on the prototype, we could determine it before the subroutine
> call. Might also be able to lazily evaluate the argument list for
> non-prototyped lists. If it says:
>
> sub somesub {
> my @foo = @_;
> }
>
> then listify the object.
Urgh. If you want lazy eval, say so explicitly:
sub somesub (?@) {
my @foo = @_;
}
> But that way lies casts so you can say that you want the first thing
> from date()'s list value .... I hate casts. I would trust mjd to
> tell me that it could be done right, but until he says that, I'm
> against anything that requires casting.
I'll be against casts *even* if MJD blesses them.
I REALLY hate casts.
Damian