Eric wrote:
Hey,

Since you wouldn't expect an object to stringify or numify why expect pairs
to? I'm not sure i see any value in thatm, $pair.perl.say would be the best
way to output one anyway.

my $pair1 = (a => 2);
my $pari2 = (b => 3);
say $pair1 + $par2; # Error: illegal stringification of pair.?

I know nothing, but couldn't users create there own pair class that does
what they want? Or extend the builting one to override operators they way
they want?

Actually I do except some object to stringify or numify. For example en object of type date should stringify to something like "January 1, 2000" and also to numify to the Julian day number.

Now for a related question: is it intended that ~$x and +$n be the same as $x.as(Str) and $x.as(Num)? How locked in stone would this be, I.e.,
~ and + are macros that give the .as() form?

--
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to