[Cuis-dev] Thoughts about symbols

Luciano Notarfrancesco luchiano at gmail.com
Sun Dec 1 02:40:53 PST 2024


On Sun, Dec 1, 2024 at 17:14 Andres Valloud via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

>
> What triggered this conversation was the observation that the current
> string implementation strategy has side effects.  Since storage of code
> points is fused with its interpretation, well then, what are we going to
> do with symbols?
>
> Currently we have an expedient way out: make a symbol subclass for each
> string class.  But this leads to duplication.  The reason for this
> duplication is that storage and interpretation are fused.


I don’t think the current design is wrong, or that anything is broken… but
I’m no expert on unicode. My post was more about thinking together about
the nature of symbols. Anyway, the code duplication is minimal, and could
be solved by other means (moving some methods up to CharacterSequence, for
example, although they make more sense for symbols than for general
strings). Also, as I suggested, making Symbol just a subclass of object
with an instance variable for the representative string solves this
“problem” without introducing more complexity (new classes to represent
sequences of codepoints separate from sequences of characters, etc)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241201/014a2e98/attachment.htm>


More information about the Cuis-dev mailing list