Proposal: #symbol printing
Stefan Matthias Aust
sma at 3plus4.de
Tue Apr 25 17:27:09 UTC 2000
At 16:16 24.04.00 -0700, Dan Ingalls wrote:
> >Change Symbol printString to emit
> > #xxx
> >if xxx is a valid smalltalk identifier and
> > #'xxx'
>Sounds good to me. I think you mean 'literal' rather than 'identifier',
>and I think the method is 'isLiteral'.
> >Provide the old implementation in a method called #displayString. Also
> >provide a #display: method for Streams.
>I'm mildly opposed to this. I'd like to start shrinking protocols, not
>expanding them. But if this is how all the other STs do it, and if it
>doesn't add a lot, I suppose we'd go along with it. At this point,
>space-wise, it would only be a fart in a hurricane.
While I agree upon every effort to shrink protocols, I think it's important
to distinguish programmer print strings and UI display strings. Instead of
displayString one could use something similar to Java's CellRenderer to
provide a hook for displaying any kind of objects without relying only on
printStrings. But as other Smalltalks already use displayString with great
success I'd go for that alternative.
It's probably more important to be as compatible as possible with other
systems as to omit a few one-liners. It always bothers me that each
Smalltalk implementation is so different from all others. Here, Java has
a big advantage.
Stefan Matthias Aust // ...come on, kiss the frog!
More information about the Squeak-dev