Nathan Torkington wrote:
>
> Dan Sugalski writes:
> > Which sort of argues for localtime in a numeric scalar context to return
> > epoch seconds, in a string scalar context to return a time string, and in a
> > plain scalar context a hashref. (or mini-object, or tied thingamabob, or
> > whatever) Of course, we're trying to kill $! which does that, which is a
> > counter-argument...
>
> I'm nervous about these different contexts. I thought scalar vs list
> was confusion enough. Now we're talking about overloading even
> further? We need to think VERY long and VERY hard about this before
> thinking it's a good thing.
>
> Nat
We could stop insisting on these finitely enumerated and nonextendable
"contexts" and start allowing overloading assignment, like so:
The assignment operator is selected from the Rvalue's methods, therefore
the Rvalue gets to examine the type of the Lvalue and decide what to give it.
In this scheme, "time" could by default return an integer, except if the
Rvalue has a defined time-override method, in which case it is used instead.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
On hold for tech support since 1995
- Re: RFC 73 (v1) All Perl core functions should return ob Chaim Frenkel
- Re: RFC 73 (v1) All Perl core functions should retu... Peter Scott
- Re: RFC 73 (v1) All Perl core functions should retu... Dan Sugalski
- Re: RFC 73 (v1) All Perl core functions should ... Nathan Torkington
- Re: RFC 73 (v1) All Perl core functions sho... Jarkko Hietaniemi
- Re: RFC 73 (v1) All Perl core functions sho... Peter Scott
- Re: RFC 73 (v1) All Perl core functions sho... Dan Sugalski
- Re: RFC 73 (v1) All Perl core functions... Nathan Torkington
- Re: RFC 73 (v1) All Perl core func... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core func... David L. Nicol
- Re: RFC 73 (v1) All Perl core func... Steve Simmons
- Re: RFC 73 (v1) All Perl core func... Dan Sugalski
- overloading assignment operators David L. Nicol
- Re: overloading assignment operato... Dan Sugalski
- Re: RFC 73 (v1) All Perl core functions... Damian Conway
- Re: RFC 73 (v1) All Perl core func... Nathan Torkington
- Re: RFC 73 (v1) All Perl core func... Dan Sugalski
- Re: RFC 73 (v1) All Perl core func... Damian Conway
- Re: RFC 73 (v1) All Perl core func... Chaim Frenkel
- Re: RFC 73 (v1) All Perl core func... Damian Conway
