Re: Sets vs Junctions

2005-02-22 Thread Jonathan Lang
Michele Dondi wrote: > OTOH all these discussions seem to imply that there is some demand (by > me, for one!) for a "set-like" builtin data-type as well as for the > already existing hashes and junctions and of course for > interoperability between any two of them, e.g. in terms of automatic > c

Re: Sets vs Junctions

2005-02-22 Thread Michele Dondi
On Tue, 22 Feb 2005, Larry Wall wrote: On Mon, Feb 21, 2005 at 10:32:15PM -0800, Jonathan Lang wrote: : ...then you've got the notion of Fuzzy Logic Sets, where the key would be [snip] But using values for degree of membership is an interesting idea. On the other hand, if we ever have numeric datat

Re: Sets vs Junctions

2005-02-22 Thread Michele Dondi
On Mon, 21 Feb 2005, Jonathan Lang wrote: There are a couple of problems: first, a hash's keys are limited to strings; a set ought to be able to handle a wider range of data types. Well, if I had learnt something about Perl6 it is that it is no longer necessarily so. Michele -- It's also amazing

Re: Sets vs Junctions

2005-02-22 Thread Larry Wall
On Mon, Feb 21, 2005 at 10:32:15PM -0800, Jonathan Lang wrote: : ...then you've got the notion of Fuzzy Logic Sets, where the key would be : the prospective element and the value would be the degree of membership. : For fuzzy sets, hashes seem to be a better fit than junctions, which have : no obv

Re: Sets vs Junctions

2005-02-22 Thread Brent 'Dax' Royal-Gordon
Jonathan Lang <[EMAIL PROTECTED]> wrote: > There are a couple of problems: first, a hash's keys are limited to > strings; a set ought to be able to handle a wider range of data types. Last time I checked, there was going to be a way to declare a different data type for the key (which could easily

Re: Sets vs Junctions

2005-02-21 Thread Jonathan Lang
Larry Wall wrote: > Michele Dondi wrote: > : Jonathan Lang wrote: > : > > If we want Sets in Perl, we should have proper Sets. > : > > : > I'll agree, depending on what you mean by "proper". I'd be > : > interested in having some means to perform set operations in perl6: > : > unions, intersectio

Re: Sets vs Junctions

2005-02-21 Thread Larry Wall
On Mon, Feb 21, 2005 at 03:07:34PM +0100, Michele Dondi wrote: : On Sun, 13 Feb 2005, Jonathan Lang wrote: : : >> If we want Sets in Perl, we should have proper Sets. : > : >I'll agree, depending on what you mean by "proper". I'd be interested in : >having some means to perform set operations i

Re: Sets vs Junctions

2005-02-21 Thread Michele Dondi
On Sun, 13 Feb 2005, Jonathan Lang wrote: If we want Sets in Perl, we should have proper Sets. I'll agree, depending on what you mean by "proper". I'd be interested in having some means to perform set operations in perl6: unions, intersections, differences, membership checks, and subset/superse

Re: Sets vs Junctions

2005-02-14 Thread Damian Conway
Jonathan Lang wrote: Maybe "set" should be an operator akin to "any", "all", "one", and "none", at least in terms of "&" and "|". That is, if junctions are special cases of sets, why not allow for the creation of generic sets in much the same way? Then you could have: # $A and $B are sets, unio

Re: Sets vs Junctions

2005-02-13 Thread Jonathan Lang
Rod Adams wrote: > Now that I've gotten some feedback from my original message (on list and > off), and have had some time to think about it some more, I've come to > some conclusions: > >Junctions are Sets. (if not, they would make more sense if they > were.) As pointed out elsewhere, Junc