Dynamic arrays in D 1.0

bearophile bearophileHUGS at lycos.com
Sun May 11 16:17:23 PDT 2008


Bill Baxter:
> How does std.string measure up to your standards?  No "erase" function 
> for removing a subrange efficiently, but yet it contains "soundex()"?

I am not an expert of string APIs yet, but I have already posted here few lists of comments, where I have expressed some of my comments. I think std.string:
- Sometimes it's good enough
- it has 1-3 functions that I think can be removed/renamed
- will enjoy some general array algorithms instead of just string ones, it may mean some functions can be generalized and moved elsewhere (like Tango has done, I think).
- a better unicode management may be in order
- a lazy xslice function plus few other may be added, see my d.string module in my d libs for some functions I think are missing.
- Most functions are slow and they can improved, for example see my string module again for a _much_ faster case-changing function. And Tango shows that it's positive to give you optional ways to avoid heap activity.

Bye,
bearophile



More information about the Digitalmars-d mailing list