On Tue, Dec 18, 2012 at 3:43 PM, Victor Berchet <vic...@suumit.com> wrote:

> Dear all:
>
> I would like to get your feedback on implementing some more data structure
> in the PHP core.
>
> Things like Set, Map could be really helpful.
>
> A Set would be an unordered collection with no duplicate elements (same as
> in Python)
>
> $setA = new Set();
> $setA->append('a');
> $setA->append('a');
>
> $setB = new Set();
> $setB->append('b');
>
> $setA == $setB;
>
> // A set can hold objects
> $set->append($object);
>
> A Map would be an associative array that can hold objects (same as Python
> dictionaries)
>
> $map= new Map();
>
> $map[$setA] = 'Hello, world!';
> echo $maps[$setB]; // Hello, world !
>
> I can not really help with the implementation, however I could help
> defining the API, creating a test suite and docs should this idea be
> accepted.
>
> Note: I had to implement this in PHP while working on Automaton, it's
> tedious and inefficient.
>
> Thanks for your feedback,
> Victor
>


Cool !

I recall some people have already talked about that in the past, have you
read about this ?
So, the process is always the same : wait for ppl feedback, write an RFC,
create patches, test&debug, call for vote, etc.. :-)

Julien.P

Reply via email to