[GemStone-Smalltalk] #printString [was Re: first: / last:]

Richard Sargent via GemStone-Smalltalk gemstone-smalltalk at lists.gemtalksystems.com
Fri Sep 19 14:19:44 PDT 2014


Gemstone/S mailing list wrote
>>Actually, I would argue against this. You want a #printAsLiteral
or>something like that, implemented in all your dialects. In such a case,
you
>>take responsibility for ensuring the array can be represented literally.
> 
> True... and that's what do: we use our own string output methods. 
> But for printing an Array I think that #(1 2 3) is a more readable output
> than anArray( 1, 2, 3).

For simple literal values, that is true. Once you start getting objects that
don't print as literals, it gets less readable, especially with the
separated "a" or "an" prefixes adding to the clutter.

And yet, we take pride in Smalltalk's near English syntax. So, using commas
is closer to English than avoiding them. :-)




--
View this message in context: http://forum.world.st/first-last-tp4778749p4779099.html
Sent from the Gemstone/S mailing list archive at Nabble.com.


More information about the GemStone-Smalltalk mailing list