Why Strings as Classes?

Don nospam at nospam.com.au
Thu Aug 28 00:21:18 PDT 2008


Chris R. Miller wrote:
> Dee Girl wrote:
>> Chris R. Miller Wrote:
>>> You honestly cannot write a spec for generic programming and expect
>>> uniform performance.
>> But this is what STL did. Sorry, Dee Girl
> 
> Reading back through the STL intro, it seems that all this STL power
> comes from the iterator.  Supposing I wrote a horrid iterator (sort of
> like the annoying O(n) opIndex previously discussed) I don't see why STL
> is "immune" to the same weakness of a slower data structure.
> 
> I can see how STL is more powerful in that you can pick and choose the
> algorithm to use, but at this point I think we're discussing changing
> the nature of the sort property in D at a fundamental level.
> 
> I still just don't see the (apparently obvious) advantage of STL.

Read Alexander Stepanov's notes. They are fantastic.

http://www.stepanovpapers.com/notes.pdf



More information about the Digitalmars-d mailing list