Sorry if I'm jumping inhere without the appropriate background, but I don't understand why jumping through these hoops are necessary. Please let me know if I'm missing anything.

Many problems can be solved by another layer of indirection. Isn't a string essentially a bidirectional range of code points built on top of a random access range of code units? It seems to me that each abstraction separately already fits within the existing D range framework and all the difficulties arise as a consequence of trying to lump them into a single abstraction.

Why not choose which of these abstractions is most appropriate in a given situation instead of trying to shoe-horn both concepts into a single abstraction, and provide for easy conversion between them? When character representation is the primary requirement then make it a bidirectional range of code points. When storage representation and random access is required then make it a random access range of code units.

Reply via email to