digitalmars.D.dtl - mintl structs updated
- Ben Hinkle (28/28) May 16 2005 I'm still playing around with the class and interface wrappers for MinTL...
- Ben Hinkle (10/38) May 22 2005 A slight change to the above struct updates. I've removed mintl.box sinc...
I'm still playing around with the class and interface wrappers for MinTL but I've made some improvements to the core struct library. The changes are: * box.d: new from Burton Radons and use in share.add(...) * adapter.d: new mixins for adapters * stack.d: new adapter for stack * queue.d: new adapter for queue * set.d: new adapter for sets and multi-sets * list.d: CList to CircularList and CSList to CircularSList * all: change move(), moveHead(), moveTail() to next() * all: added take() and takeHead/Tail to return value if any * concurrent/aa.d: ConcurrentAA changes to implement Collection * arraylist.d: grow ArrayList capacity geometrically * all: implement properties keys, values for all Collections * all: remove toArray and replace with values * all: remove toSeq since instantiating CFoo is equivalent * share.d: rename Seq, SeqWithKeys as Sequence, IndexedSequence * linked/sortedaa.d: change fromHead, fromTail to head/tail * lists: add head/tail properties to get one-item slices of head/tail * list.d: remove length setter and make length==0 mean unknown length that gets computed only when required * list.d: make head null indicate empty list, tail hold cache * sortedaa.d: add from(key) and to(key) * deque.d: simplify code by not resizing block size and making it cyclic * arraylist.d: fix copyBlock bug copying between arrays of different size Available at the usual place: http://home.comcast.net/~benhinkle/mintl/ I should have the classes done soon. Plus I've trimmed the mintl html help to make it easier to take in.
May 16 2005
In article <d6bo2s$ds1$1 digitaldaemon.com>, Ben Hinkle says...I'm still playing around with the class and interface wrappers for MinTL but I've made some improvements to the core struct library. The changes are: * box.d: new from Burton Radons and use in share.add(...) * adapter.d: new mixins for adapters * stack.d: new adapter for stack * queue.d: new adapter for queue * set.d: new adapter for sets and multi-sets * list.d: CList to CircularList and CSList to CircularSList * all: change move(), moveHead(), moveTail() to next() * all: added take() and takeHead/Tail to return value if any * concurrent/aa.d: ConcurrentAA changes to implement Collection * arraylist.d: grow ArrayList capacity geometrically * all: implement properties keys, values for all Collections * all: remove toArray and replace with values * all: remove toSeq since instantiating CFoo is equivalent * share.d: rename Seq, SeqWithKeys as Sequence, IndexedSequence * linked/sortedaa.d: change fromHead, fromTail to head/tail * lists: add head/tail properties to get one-item slices of head/tail * list.d: remove length setter and make length==0 mean unknown length that gets computed only when required * list.d: make head null indicate empty list, tail hold cache * sortedaa.d: add from(key) and to(key) * deque.d: simplify code by not resizing block size and making it cyclic * arraylist.d: fix copyBlock bug copying between arrays of different size Available at the usual place: http://home.comcast.net/~benhinkle/mintl/ I should have the classes done soon. Plus I've trimmed the mintl html help to make it easier to take in.A slight change to the above struct updates. I've removed mintl.box since std.boxer is the same thing and I've added custom allocator support so that one can plug in malloc/free memory management. If you use a custom allocator you have to be careful to call clear() when you are done with the container to release the memory and remove root ranges. Since structs don't have destructors (and they wouldn't run anyway since the struct isn't GC managed!) you have to explicitly free the container. The malloc-based allocators seem to be pretty snappy. The web page is updated for these changes, too.
May 22 2005