Re: printing collections
Posted by Andreas.Raab on Nov 03, 2009; 9:41pm
URL: https://forum.world.st/printing-collections-tp360853p361110.html
Nicolas Cellier wrote:
> OK, I see ' newFrom: ' can be considered as noise, so we can't have
> our cake and eat it too ?
> I find the fact that simple objects print as a simple code snippet
> such a nice feature though...
But why? How often have you taken the result of something and evaluated
it again (not counting literals)? It seems an extremely rare case
compared with what we mostly need to do: Quickly understand the kind of
collection we're looking at and its contents. The ClassName(elem1,
elem2) printing achieves this with minimal complications.
If you really want the code to construct the object send storeString.
Cheers,
- Andreas