[squeak-dev] String & Text
jakres+squeak at gmail.com
Mon Jul 18 08:18:53 UTC 2022
Am Mo., 18. Juli 2022 um 09:11 Uhr schrieb Marcel Taeumel <
marcel.taeumel at hpi.de>:
> Or maybe it is just a single operation that needs to be refined in String
> to bypass that #string lookup.
One thing that would make the introduction of a common superclass easier is
that Text already agrees with String that do: enumerates the characters and
at: accesses a single character, not a combination of characters and
attributes. So as long as a method only needs such basic
SequenceableCollection features, one can simply pull it up. Whether that
still preserves enough for the workings of Text, is another question. Texts
would turn to Strings in several of the implementations of String methods
if these were pulled up. Other methods like substring replacement are
already implemented suitably in both String and Text, so one can also rely
on those in methods that would be pulled up.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev