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: Slurpy nullary vs nonslurpy nullary

2005-02-21 Thread Autrijus Tang
On Tue, Feb 22, 2005 at 09:41:54AM +1100, Damian Conway wrote: > Personally, I think the only reasonable way of resolving this is to > assume (as in the last paragraph above) that function calls in these > kinds of indeterminate contexts are always in list context. So, even if the clash is Num vs

Re: Question about pairs

2005-02-21 Thread Steve Peters
On Mon, Feb 21, 2005 at 11:32:16AM -0800, Larry Wall wrote: > On Mon, Feb 21, 2005 at 02:07:10PM +, osfameron wrote: > : >In Perl 6, C<< => >> is a fully-fledged anonymous object constructor -- > : >like C<[...]> and C<{...}>. The objects it constructs are called > : >"pairs" > : >

Re: Fun with junctions (was Sets vs Junctions)

2005-02-21 Thread David Storrs
On Mon, Feb 21, 2005 at 11:01:45AM -0800, Larry Wall wrote: > > But rather than that, I suspect we'll see more use of constructs > where the object to be mutated ends up being the topic, as in: > > some_complicated_lvalue() but= { .sortmyway(foo($_),bar($_)) } > > which would presumably do t

Re: Slurpy nullary vs nonslurpy nullary

2005-02-21 Thread Damian Conway
Autrijus wrote: > A difficulty arises because the expressions used as arguments > is not evaluated when arityMatch is done, and for good reason -- > they may do wildly different things depending on its context. > > When Pugs was only implementing FP6, I could affort to force > evaluation for each m

Re: Slurpy nullary vs nonslurpy nullary

2005-02-21 Thread Larry Wall
On Sat, Feb 19, 2005 at 12:44:49AM +0800, Autrijus Tang wrote: : On Fri, Feb 18, 2005 at 08:26:26AM -0800, Larry Wall wrote: : > So I think your initial solution is actually the right one from the : > viewpoint of the Perl programmer. If we need to tweak something, : > it's perhaps to document the

Re: Question about pairs

2005-02-21 Thread Larry Wall
On Mon, Feb 21, 2005 at 02:07:10PM +, osfameron wrote: : >In Perl 6, C<< => >> is a fully-fledged anonymous object constructor -- : >like C<[...]> and C<{...}>. The objects it constructs are called : >"pairs" : >and they consist of a key (the left operand of the C<< => >>), and a

Re: Lingering questions about Junctions.

2005-02-21 Thread Larry Wall
On Sun, Feb 20, 2005 at 02:45:36AM +0100, Stefan Lidman wrote: : Junctions should be on or off by default, I prefer on. : Having them half-on is bad. : : Because if it is half-on people(me) is going to write : C< if $x == 3 | 5 | 7 { > in N places then have to : change it and remember to change it

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: Question about pairs

2005-02-21 Thread osfameron
In Perl 6, C<< => >> is a fully-fledged anonymous object constructor -- like C<[...]> and C<{...}>. The objects it constructs are called "pairs" and they consist of a key (the left operand of the C<< => >>), and a value (the right operand). Can pairs also be used to create linke

Re: Fun with junctions (was Sets vs Junctions)

2005-02-21 Thread Larry Wall
On Mon, Feb 21, 2005 at 03:11:12PM +0100, Michele Dondi wrote: : On Mon, 14 Feb 2005, Michele Dondi wrote: : : >Speaking of which, while I think that methods on the implicit topicalizer : >and the C<.=> assignement operator are indeed cool, I wonder if any : >provision will be made for a conveni

Re: Question about pairs

2005-02-21 Thread Larry Wall
On Mon, Feb 21, 2005 at 07:50:12PM +0800, Autrijus Tang wrote: : On Mon, Feb 21, 2005 at 09:33:33PM +1100, Damian Conway wrote: : > In Perl 6, C<< => >> is a fully-fledged anonymous object constructor -- : > like C<[...]> and C<{...}>. The objects it constructs are called "pairs" : > an

Re: Question about pairs

2005-02-21 Thread Juerd
Steve Peters skribis 2005-02-21 8:08 (-0600): > Great! I figured I was just missing something. As a followup, is there > someplace where the raw Pod for the Apocalypses, Exegeses, and Synopses live. > The Pod versions would be much easier to search in bulk than going through > the web pages on

Re: Fun with junctions (was Sets vs Junctions)

2005-02-21 Thread Michele Dondi
On Mon, 14 Feb 2005, Michele Dondi wrote: Speaking of which, while I think that methods on the implicit topicalizer and the C<.=> assignement operator are indeed cool, I wonder if any provision will be made for a convenient stand in for "whatever is on the left side of an assignment operator", e

Re: Question about pairs

2005-02-21 Thread Steve Peters
On Mon, Feb 21, 2005 at 09:33:33PM +1100, Damian Conway wrote: > Steve Peters wrote: > > >While looking into Perl 6 and pugs, I noticed a problem with Pairs pretty > >quickly. Although pairs look like a very useful data type, I could find > >in the "Perl 6 and Parrot Essentials" or any Apocolyp

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: Question about pairs

2005-02-21 Thread Autrijus Tang
On Mon, Feb 21, 2005 at 09:33:33PM +1100, Damian Conway wrote: > In Perl 6, C<< => >> is a fully-fledged anonymous object constructor -- > like C<[...]> and C<{...}>. The objects it constructs are called "pairs" > and they consist of a key (the left operand of the C<< => >>), and a >

Re: Question about pairs

2005-02-21 Thread Damian Conway
Steve Peters wrote: While looking into Perl 6 and pugs, I noticed a problem with Pairs pretty quickly. Although pairs look like a very useful data type, I could find in the "Perl 6 and Parrot Essentials" or any Apocolypse or other document on how to get the key or value from a pair. I was think

Question about pairs

2005-02-21 Thread Steve Peters
Sorry if this email is nearly duplicated, but I may have had the wrong email address on the firt email I sent. While looking into Perl 6 and pugs, I noticed a problem with Pairs pretty quickly. Although pairs look like a very useful data type, I could find in the "Perl 6 and Parrot Essentials"

Pairs and they work in Perl 6

2005-02-21 Thread Steve Peters
I've been starting to play around with Perl 6 and pugs when I ran into some questions regarding pairs. I've looked through "Perl 6 and Parrot Essentials" as well as the Apocolypses and others and haven't found a good answer. What is the method for retrieving a key or value from a pair? Steve Pe

Re: Lingering questions about Junctions.

2005-02-21 Thread Stefan Lidman
Junctions should be on or off by default, I prefer on. Having them half-on is bad. Because if it is half-on people(me) is going to write C< if $x == 3 | 5 | 7 { > in N places then have to change it and remember to change it in N-1 places. Oops. ON or OFF. On please. /Stefan Lidman