I wonder if I could ask a silly question. My understanding is that strings are pretty much unique in not being objects, and relying on a fair amount of compiler and RTL wizardry to handle reference counting etc.

I note somebody at Embarcadero blogging [Paraphrase follows] "Delphi is being enhanced by adding memory management features such as reference counting".

Would there be any advantage in reimplementing strings as a tree of classes, with the compiler doing appropriate things to change e.g. Pos() into String.Pos(), UnicodeString.Pos() or whatever as appropriate?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to