2012/2/3 Lukas Renggli <renggli@gmail.com>:
This is all very much at an experimental phase.
what is the diff between arrayList and vectorList ?
ArrayList is double ended (very much like OrderedCollection), VectorList is single ended. I was just experimenting to see if it makes a difference.
Do you have some kind of high level description of Container explaining the rationale, ideas and approach.
The core idea is to split iteration from containment; I think a horrible design mistake in the Smalltalk-80 collections.
Do you have some kind of high level description of Container explaining the rationale, ideas and approach. It is one thing to browse the code, but the why/how is important as a guide.
Another idea is to split the backing store from the container and allow the composition of collection properties:
 - uniqueness: yes, no  - order: natural, custom, indexed  - access: indexed, keyed  - structure: hashed, treed, linked  - weakness: yes, no (not even touched yet)
It seems that although you introduce iterators, they are less annoying then expected, which is great.
The goal here is to be as lazy as possible and avoid unnecessary loops over the collections.
Also iterators avoid the explosion of selector combinations like (#do: and #withIndexDo: and #withIndexCollect:, etc) by utilizing objects.
Also, a certain level of backwards compatibility seems to be present, looking at message names.
I like the existing names, but then this is not a goal. Also I am not sure if methods like #add: and #at:put: should really return the argument.
These two are convenient for enabling this kind of DSL instructions A[i] := B[j] := c But of course, a dup bytecode would also do the trick... Nicolas
Essentially the goal is to provide an alternative to the Smalltalk-80 collections by adopting some ideas from modern collection libraries in Java, C++, Scala, Haskell, etc.
Lukas
On 3 February 2012 10:07, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
what is the diff between arrayList and vectorList ? I have plenty of other questions. :)
Stef
On Feb 3, 2012, at 9:26 AM, Lukas Renggli wrote:
See below for an alternative collection implementation:
 http://jenkins.lukas-renggli.ch/job/Container/
Also contains a nice double-linked-list, as well as many other standard containers that are missing in standard Smalltalk.
Lukas
On 3 February 2012 07:52, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi
I was thinking that linkedList is really not to be used by something else than the scheduler (remember the problem we got with change == into something else).
So I was wondering if it would not be simpler/safer to design a generalPurpose fast/robust LinkedList too?
Stef
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch