Why Strings as Classes?

Chris R. Miller lordSaurontheGreat at gmail.com
Wed Aug 27 21:09:29 PDT 2008


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.
Disclaimer: I do not /know/ STL that well at all.  I came from Java with
a ___brief___ dabbling in C/C++.  So I'm not trying to be annoying,
stupid, or blind - I'm just ignorant of what you see that I don't.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080827/dd7fd8dc/attachment.pgp>


More information about the Digitalmars-d mailing list