>>>>> "NT" == Nathan Torkington <[EMAIL PROTECTED]> writes:
NT> 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...
NT> I'm nervous about these different contexts. I thought scalar vs list
NT> was confusion enough. Now we're talking about overloading even
NT> further? We need to think VERY long and VERY hard about this before
NT> thinking it's a good thing.
Is it really confusing? Wouldn't it remove the problem of hash flattening?
$scalar = func == singular whatzit
@array = func == plural whatzit
%hash = func == dictionary whatzit
And if we could have some type of casting, err, context coercion
this might help make things clearer.
scalar ( func ) == any singular whatzit
integer( func ) == a number
string ( func ) == a string
array ( func )
hash ( func )
Though that would take away some keywords.
<chaim>
--
Chaim Frenkel Nonlinear Knowledge, Inc.
[EMAIL PROTECTED] +1-718-236-0183