On 05/22/2010 09:07 PM, Sean Kelly wrote:
Andrei Alexandrescu Wrote:
One thing before I forget: I think any good collection abstraction must
be concretized back to the classic collection instances. Singly-linked
lists definitely can't be left off the list! It would be an epic
failure. Imagine the papers! New York Times: "D has containers, but no
singly-linked lists".
We could always say we were following C++'s lead :-)
C++(0|1)x has forward_list. Needless to say, supporting size() at
constant complexity was a matter of huge debate. The proposal that I
like is this:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2543.htm
Search the page for "size()".
I don't know how the proposal was amended.
Andrei