Patrick R. Michaud wrote:
> On Thu, Oct 30, 2008 at 05:46:11PM +0100, Moritz Lenz wrote:
>> 
>> I think that every class should have a default stringification. Dunno if
>> there's a ticket for it yet.
> 
> I don't think there's a _spec_ for a default stringification yet.  
> So we should probably propose that first, and then see about an 
> implementation.  :-)

$ perl5.10.0 -E 'say bless []'
main=ARRAY(0x8c56880)

If it's not specced in Perl 6, Perl 5 behaviour is used...

Actually I think that the idea of printing a class name (or <anon> or
something like that for anonymous classes) and a pointer address isn't
all that bad, because it gives some basic information, and reminds the
programmer that he either shouldn't print it, or define an overload method.

A fatal error seem too strong to me...

Anyway, a spec would still be nice.

Moritz


-- 
Moritz Lenz
http://perlgeek.de/ |  http://perl-6.de/ | http://sudokugarden.de/

Reply via email to