> In a scalar context, it could produce a date object always: > > $date = date; > > However, when you went to do anything with it in a string context, it > would call the appropriate method: > > print "$date"; # calls $date->STRING, which in this case would > # print out a ctime formatted date string Well, I like this. It reminds me of Java's .toString method (see http://java.sun.com/products/jdk/1.1/docs/api/java.lang.String.html ). I am intrigued by the idea of a "scalar" context, and a "string" context though. --Michael
- RFC 48 (v2) Objects should have builtin stringifying Perl6 RFC Librarian
- Re: RFC 48 (v2) Objects should have builtin strin... Michael Mathews
- Re: RFC 48 (v2) Objects should have builtin s... Nathan Wiger
- Re: RFC 48 (v2) Objects should have builtin strin... Dan Sugalski
- Re: RFC 48 (v2) Objects should have builtin s... Nathan Torkington
- Re: RFC 48 (v2) Objects should have builtin strin... Michael Fowler
- Re: RFC 48 (v2) Objects should have builtin s... Jonathan Scott Duff
- Re: RFC 48 (v2) Objects should have built... John Porter
- Re: RFC 48 (v2) Objects should have b... Jonathan Scott Duff
- Re: RFC 48 (v2) Objects should h... John Porter
- Re: RFC 48 (v2) Objects should have builtin s... Nathan Wiger
- Re: RFC 48 (v2) Objects should have built... Dan Sugalski