|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
digitalmars.D.dtl - more mintl class ideas
Well I've started to explode the class and interface list to be more standard. The squished hierarchy wasn't wearing very well. I'm also testing names without I or C prefixes and using the package to distinguish the classes from the structs. Note I'm leaning towards keeping slicing and anything that returns collections to be in the class hierarchy instead of the interface hierarchy so that covariance will work. That is, if the slice of an AbstractList is an AbstractList then the slice of a LinkedList can be a LinkedList. /** Interface Hierarchy * * Enumeration(Value) * IndexedEnumeration(Index,Value) * * Container(Value) : Enumeration(Value) * AssocContainer(Key,Value) : IndexedEnumeration(Key,Value) * List(Value) : IndexedEnumeration(size_t,Value) * Set(Value) * MultiSet(Value) * Stack(Value) * Queue(Value) */ /** Class Hierarchy * * AbstractContainer(Value) : Container!(Value) * AbstractAA(Key,Value) : AssocContainer(Key,Value) * ConcurrentAA * HashTable * SortedAA * LinkedAA * AbstractList(Value) : List(Value) * LinkedList * ArrayList * Deque * CircularList * SList * CircularSList * AbstractSet(Value) : Set(Value) * HashSet * SortedSet * LinkedSet * AbstractMultiSet(Value) : MultiSet(Value) * HashMultiSet * SortedMultiSet * LinkedMultiSet * AbstractStack(Value) : Stack(Value) * ArrayStack * DequeStack * LinkedStack * AbstractQueue(Value) : Queue(Value) * ArrayQueue * DequeQueue * LinkedQueue * PriorityQueue */ May 22 2005
Ben, this is really good spec. - I like it. If you need co-developer for this project please do not hesitate to contact me. -- ........... Dejan Lekic http://dejan.lekic.org May 24 2005
Ben, this is really good spec. - I like it. If you need co-developer for this project please do not hesitate to contact me. May 24 2005
Ben, this is really good spec. - I like it. If you need co-developer for this project please do not hesitate to contact me. May 27 2005
"Dejan Lekic" <leka entropy.tmok.com> wrote in message news:d77epc$1p5d$1 digitaldaemon.com...Ben, this is really good spec. - I like it. If you need co-developer for this project please do not hesitate to contact me. May 27 2005
FWIW: I think Ben is right on the mark here ~ particularly so regarding the "granularity" aspect. Thread-safety is an important issue, but insisting everyone should always pay that "tax" is not necessarily the right answer. "Ben Hinkle" <bhinkle mathworks.com> wrote in message news:d77gdf$1qm1$1 digitaldaemon.com..."Dejan Lekic" <leka entropy.tmok.com> wrote in message news:d77epc$1p5d$1 digitaldaemon.com...Ben, this is really good spec. - I like it. If you need co-developer May 30 2005
Ben, why not use version(threadsafe) (or similar) inside MinTL and have simple ability to easily have both threadsafe and non-threadsafe MinTL? Kind regards Dejan -- ........... Dejan Lekic http://dejan.lekic.org May 24 2005
why not use version(threadsafe) (or similar) inside MinTL and have simple ability to easily have both threadsafe and non-threadsafe MinTL? May 24 2005
That is precisely why i wrote previous post... I would like WHOLE MinTL to be threadsafe if it is compiled with "threadsafe" version turned on. IMHO there is no need for separate package... -- ........... Dejan Lekic http://dejan.lekic.org May 24 2005
"Dejan Lekic" <leka entropy.tmok.com> wrote in message news:d6vtud$25n6$1 digitaldaemon.com...That is precisely why i wrote previous post... I would like WHOLE MinTL to be threadsafe if it is compiled with "threadsafe" version turned on. IMHO there is no need for separate package... -- ........... Dejan Lekic http://dejan.lekic.org May 24 2005
Have You, than, considered having ONLY threadsafe MinTL? Personally I am writing more and more code which uses threads, and I am pretty sure a lot of other developers do the same... -- ........... Dejan Lekic http://dejan.lekic.org May 24 2005
"Dejan Lekic" <leka entropy.tmok.com> wrote in message news:d715a4$sdd$1 digitaldaemon.com...Have You, than, considered having ONLY threadsafe MinTL? Personally I am writing more and more code which uses threads, and I am pretty sure a lot of other developers do the same... -- ........... Dejan Lekic http://dejan.lekic.org May 25 2005
A lot of those ideas sound great, but why DequeQueue and DequeStack? They only need insertions at one end, so I don't understand the advantages of using a deque. However, I do like the idea of having Array&Stack versions. In article <d6ri5c$90$1 digitaldaemon.com>, Ben Hinkle says...Well I've started to explode the class and interface list to be more standard. The squished hierarchy wasn't wearing very well. I'm also testing names without I or C prefixes and using the package to distinguish the classes from the structs. Note I'm leaning towards keeping slicing and anything that returns collections to be in the class hierarchy instead of the interface hierarchy so that covariance will work. That is, if the slice of an AbstractList is an AbstractList then the slice of a LinkedList can be a LinkedList. /** Interface Hierarchy * * Enumeration(Value) * IndexedEnumeration(Index,Value) * * Container(Value) : Enumeration(Value) * AssocContainer(Key,Value) : IndexedEnumeration(Key,Value) * List(Value) : IndexedEnumeration(size_t,Value) * Set(Value) * MultiSet(Value) * Stack(Value) * Queue(Value) */ /** Class Hierarchy * * AbstractContainer(Value) : Container!(Value) * AbstractAA(Key,Value) : AssocContainer(Key,Value) * ConcurrentAA * HashTable * SortedAA * LinkedAA * AbstractList(Value) : List(Value) * LinkedList * ArrayList * Deque * CircularList * SList * CircularSList * AbstractSet(Value) : Set(Value) * HashSet * SortedSet * LinkedSet * AbstractMultiSet(Value) : MultiSet(Value) * HashMultiSet * SortedMultiSet * LinkedMultiSet * AbstractStack(Value) : Stack(Value) * ArrayStack * DequeStack * LinkedStack * AbstractQueue(Value) : Queue(Value) * ArrayQueue * DequeQueue * LinkedQueue * PriorityQueue */ Aug 24 2005
Pardon me, I meant I like the idea of Array & Linked list versions of stacks and queues (not a stack version :P ). Also, how will you implement LinkedSet, LinkedMultiSet, and LinkedAA? In article <dei1vq$2vat$1 digitaldaemon.com>, Ben Phillips says...A lot of those ideas sound great, but why DequeQueue and DequeStack? They only need insertions at one end, so I don't understand the advantages of using a deque. However, I do like the idea of having Array&Stack versions. In article <d6ri5c$90$1 digitaldaemon.com>, Ben Hinkle says...Well I've started to explode the class and interface list to be more standard. The squished hierarchy wasn't wearing very well. I'm also testing names without I or C prefixes and using the package to distinguish the classes from the structs. Note I'm leaning towards keeping slicing and anything that returns collections to be in the class hierarchy instead of the interface hierarchy so that covariance will work. That is, if the slice of an AbstractList is an AbstractList then the slice of a LinkedList can be a LinkedList. /** Interface Hierarchy * * Enumeration(Value) * IndexedEnumeration(Index,Value) * * Container(Value) : Enumeration(Value) * AssocContainer(Key,Value) : IndexedEnumeration(Key,Value) * List(Value) : IndexedEnumeration(size_t,Value) * Set(Value) * MultiSet(Value) * Stack(Value) * Queue(Value) */ /** Class Hierarchy * * AbstractContainer(Value) : Container!(Value) * AbstractAA(Key,Value) : AssocContainer(Key,Value) * ConcurrentAA * HashTable * SortedAA * LinkedAA * AbstractList(Value) : List(Value) * LinkedList * ArrayList * Deque * CircularList * SList * CircularSList * AbstractSet(Value) : Set(Value) * HashSet * SortedSet * LinkedSet * AbstractMultiSet(Value) : MultiSet(Value) * HashMultiSet * SortedMultiSet * LinkedMultiSet * AbstractStack(Value) : Stack(Value) * ArrayStack * DequeStack * LinkedStack * AbstractQueue(Value) : Queue(Value) * ArrayQueue * DequeQueue * LinkedQueue * PriorityQueue */ Aug 24 2005
|