Are iterators and ranges going to co-exist?

Steven Schveighoffer schveiguy at yahoo.com
Mon Jul 26 11:35:16 PDT 2010


On Mon, 26 Jul 2010 14:27:11 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> Steven Schveighoffer wrote:
>> No, SList is brand new, not much code has been written with it ;)  You  
>> may object, but try using it and see how far it takes you.  SList is  
>> like a normal singly linked-list but with all the power removed for  
>> safety reasons.
>
> SList is intentionally defined as a run-of-the-mill list with no  
> "smarts". I'd be definitely interested in finding ways to make it more  
> powerful. What primitives do you have in mind?

- O(1) removal (of 1 or multiple elements), insertion, and splicing.
- sorting.

Can't think of any more right now, but the sorting is somewhat secondary.   
The O(1) ops are essential to any usable LL impl.

-Steve


More information about the Digitalmars-d mailing list