On 12/11/02 1:10 PM, Michael Lazzaro wrote: > I doggishly maintain my preference for treating "stringification for > output" and "stringification for debugging" differently, but as long as > I can specify an "AS_STRING" (sp?) method for a class, and _still_ get > at a debugging version to print to other (debugging-related) strings, I > think we're all basically happy. That implies, however, that we need > at least two methods per type/class: AS_STRING, and AS_DEBUG, for lack > of better names. By default, the first calls the second.
Can we at least get something about "strings" in the name of the debug method? "AS_STRING" is pretty clear, but "AS_DEBUG" could mean a lot of things...and at first glance, it doesn't seem related to "AS_STRING" at all. Maybe "AS_STRING" and "AS_STRING_DEBUG"? Too long? "DEBUG_STRING"? Are we married to the "AS_*" thing? That naming scheme always seems "too cute" to me... > (I also beg people to stop thinking about testing for equality/equivalence > between two objects as being related to their stringification. You shouldn't > be stringifying objects merely to test if they're the same object -- yuck. It > was an artifact of Perl5 that we should be replacing.) So, what is the Perl 6 way to test this? -John