On Friday, December 6, 2002, at 01:28 AM, Joseph F. Ryan wrote:
I think people like it fine, but many people don't want it to be the default stringification. Like I said in an earlier thread, the problem is that there's "stringification for output purposes" and "stringification for debugging purposes", but we have to chose one or the other to be the default. I'd rather the debugging one _not_ be the default, personally, because I imagine the other usage is more common.Array(0x1245AB)Personally, I like this format. It's succinct, informative, and tells you enough to do identity testing.I like it too, but I thought everyone else hated it :)
An obvious counterproposal would be to say that references are invisible to stringification (e.g. it stringifies to whatever its contents stringify to). This would seem to be in keeping with the the spirit of arrayref/array transparentness, etc.
No, the AS_STRING (or str(), or whatever) is definitely the way to go. We pretty much _have_ to do it via a method.So you're saying that classes should stringify to a pretty-print of their public members?
Brent Dax wrote:
What I'm saying is that .str and .identity (for lack of a better name) are identical in Object, but classes should feel free to override .str if they have a better WTDI. The built-in classes (Array, Hash, etc.) should override .str to yield their members in some format (probably influenced by properties).
I like this a lot, personally. MikeL