Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Gael Pegliasco
> First is the choice of arrays verses hashes as the choice for set storage. > Arrays are obviously easier to construct, but hashes are both faster > implementations, and easier to determine membership. Well in fact I'm interested by such functions in order to manipulate lists of scalars (1, 'to

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Gael Pegliasco
> The point is that a hash of booleans (not a list of hashes) is a more direct > way to implement a set. A set is unordered, and does not have duplicates. > This is also true of hash keys. Furthermore, the nature of a hash makes it > faster and easier to check for the existance of a key, which

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Gael Pegliasco
> > 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 w

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Gael Pegliasco
Eric Roode wrote: > Adjust your thinking a bit, not the language. Try: >%my_fruit_set = (orange => 1, lemon => 1); >or >@my_fruit_set{qw/orange lemon/} = (); Yes, probably, this could be easiest... :) But, maybe because I'm a mulish person, I still thinking that if we actually use such

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Gael Pegliasco
John Porter wrote: > > Buddha Buck wrote: > > > > In a hash implementation, your hash keys -are- your set elements! > > > > my %set; > > > > # add elements to %set > > $set{'elem1','elem2'} = 1; > > > > # Compute union > > $union{keys %set1, keys %set2} = 1; > > Oh, yeah, using native hashes for

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-01 Thread Gael Pegliasco
Tom Christiansen wrote: > Until you start thinking of terms of hashes, you aren't thinking > in Perl. It serves no good to delay this epiphany. Also, remember > that being a "novice" is a temporary and curable condition. Perl > is designed to for long-term ease of use, not short-term learn-fre

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-11 Thread Gael Pegliasco
> At what point do you feel a new operator is not justified? Why do > we need grep/map, just use for? Why have <=>, cmp, just use ?: > > So what if the man wants > > @foo = @bar union @baz; > @foo = @bar intersetcion @baz; > > This is a lot more of a direct map than the twiddli

Re: RFC 179 (v1) More functions from set theory to manipulate arrays

2000-09-12 Thread Gael Pegliasco
Tom Christiansen wrote: > > >I don't want a set representation. I want set operations. And somehow > >for this having to add a use statment and who knows what overhead for > >what seems to be a simple operation is a pain. > > The overhead is not that it should be a module, but rather, > the sill

Re: Please take RFC 179 discussion to -data

2000-09-12 Thread Gael Pegliasco
[EMAIL PROTECTED] wrote: > > Could we please take discussion of 179 to -data? I think that's where > it should be. > > K. Personnally, I don't see any objection to this. If everybody is ok, why not ? How should I process ? Submit again the proposal with a modified mailing-list email ? Gael,

Re: Please take RFC 179 discussion to -data

2000-09-13 Thread Gael Pegliasco
Jeremy Howard wrote: > > > [EMAIL PROTECTED] wrote: > > > > > > Could we please take discussion of 179 to -data? I think that's where > > > it should be. > > > > > > K. > > > > Personnally, I don't see any objection to this. > > If everybody is ok, why not ? > > > > How should I process ? Submit