std.algorithm.remove and principle of least astonishment
Lutger Blijdestijn
lutger.blijdestijn at gmail.com
Sun Nov 21 23:53:43 PST 2010
Andrei Alexandrescu wrote:
...
>
> I agree except for the fact that in my experience you want to iterate
> over code points much more often than over code units. Iterating by code
> unit by default is almost always wrong. That's why D's strings offer the
> bidirectional interface by default. I have reasons to believe it was a
> good decision.
>
>
> Andrei
Is there a plan to make std.string and std.algorithm more compatible with
this view?
Nearly all algorithms in std.string work with slices or substrings rather
than code unit or points. I found it sometimes hard to mix and match that
approach with the api that std.algorithm offers. Maybe I'm missing
something.
More information about the Digitalmars-d
mailing list