On 2009-Feb-26, at 7:46 pm, Timothy S. Nelson wrote:
# Object has .print and .say.

My question is, would we be better off having the string conversion routine for arrays worry about the input/output record/field separators, rather than the IO object? The downside I can see is that you couldn't have separate separators for different IO objects; you'd have to code specially if you wanted that functionality.

What about having separators that exist in different scopes? Objects could define their own separators, or if they don't, default to those defined on the IO item, which in turn could default to whatever is defined in the current block, working outwards from there.

This may also mean we don't need .print and .say methods on Object. Am I missing the reason why such methods would exist, other than to allow certain objects to define their own special distinctions between printing and saying (presumably because simply adding a newline wouldn't be suitable)? In that case, all the object would need to do is to define its own record-separator.


Reply via email to