optimized immutable containers

w0rp devw0rp at gmail.com
Wed Jul 3 15:03:13 PDT 2013


On Wednesday, 3 July 2013 at 08:04:50 UTC, monarch_dodra wrote:
> The irony here (as stated by Bearophile) is that this is 
> currently how our SList and DList are actually implemented: Not 
> value nor ref semantics: Just shared owner ship of nodes...

Well, that was easy! I did not know that this is exactly how 
SList and DList are implemented, as I haven't had to use them 
yet, but that will come in handy eventualy. The operations on the 
types could use more qualifiers, though. Using them in pure 
functions would make it possible to implicitly convert them to 
immutable, which is a powerful thing indeed.


More information about the Digitalmars-d mailing list