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

Reply via email to