Larry Wall skribis 2005-03-11  8:45 (-0800):
> On Fri, Mar 11, 2005 at 03:58:13PM +0100, Thomas Sandlaß wrote:
> : Int @i;
> : Num @n = @i; # type error?
> I think the naive user is going to expect that to work, and I also
> suspect the naive user is right to expect it, because it makes sense.
> This may be one of those areas where we can successfully hide the
> high-falutin' theory from mere mortals simply because it maps onto
> what they expect already.

It'd be great if this were a standard feature you can also use for your
own objects.

I believe $foo.Num in this case should return the Num-ified version of
$foo. And maybe the int method numbers have is redundant, and should
be spelled Int instead. Or, well, if this is the case, int should return
an int (not Int) for consistency.

Maybe +$foo even maps to $foo.Num, and ~$foo maps to $foo.Str and ?$foo
maps to $foo.Bool?

Hm, are charsets representable as classes/roles?

my Str::utf8   $bar = ...;
my Str::latin1 $foo = $bar;


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Reply via email to