> 
>     Arrays are ordered.
>     Hashes are not.
>     Neither are sets.
> 
>     Arrays can have repetitions.
>     Hashes can not.
>     Neither can sets.
> 
> etc.
> 
> --tom


Yes, this is true, but the natural syntax, for me, to manipulate sets,
is the one of arrays.

It is not natural to write :

%my_fruit_set = ( 1 => 'orange', 2 => 'lemon' );

but it is natural to write :

@my_fruit_set = ( 'orange', 'lemon' );

I don't want to have to deal with keys of hashes because my set elements
don't care about them !

so, I want new functions to manipulate arrays.

then, when manipulating arrays, without speaking about sets, you often
need in/union/intersection functions, even if arrays have duplicated
elements or if they are ordered.

Well, in fact I don't understand why you don't think that
union/intersection/difference are not usefull functions for arrays ?

Gael,

Reply via email to