|
|
Warp wrote:
> If a string is really internally a list of smaller strings, wouldn't GC
> become more difficult because you can actually have "references" pointing
> to the middle of such strings and not their base?
You'd have to implement that kind of reference as a base+offset sort of
thing. Or buffer it and copy it into a list as needed, like building up
something from multiple reads of C stdio.
> I must admit, though, that I don't know how GC is implemented.
No, you're right. The kind of GC that can handle arbitrary pointers is
called "conservative GC" if I recall correctly. It works pretty poorly.
--
Darren New / San Diego, CA, USA (PST)
Remember the good old days, when we
used to complain about cryptography
being export-restricted?
Post a reply to this message
|
|