Re: How are types related to classes and roles?

2005-02-24 Thread Autrijus Tang
On Wed, Feb 23, 2005 at 12:17:19PM -0800, Larry Wall wrote: > : And how does all this combine with the notion of context? > > Lazily, for the most part. In some cases we can determine context at > compile time, but often not. Certainly a subroutine cannot determine > what context it was called i

Re: How are types related to classes and roles?

2005-02-24 Thread Nicholas Clark
On Fri, Feb 25, 2005 at 12:45:45AM +0800, Autrijus Tang wrote: > On Wed, Feb 23, 2005 at 12:17:19PM -0800, Larry Wall wrote: > > : And how does all this combine with the notion of context? > > > > Lazily, for the most part. In some cases we can determine context at > > compile time, but often not

Re: How are types related to classes and roles?

2005-02-24 Thread Larry Wall
On Thu, Feb 24, 2005 at 05:17:50PM +, Nicholas Clark wrote: : On Fri, Feb 25, 2005 at 12:45:45AM +0800, Autrijus Tang wrote: : > On Wed, Feb 23, 2005 at 12:17:19PM -0800, Larry Wall wrote: : > > : And how does all this combine with the notion of context? : > > : > > Lazily, for the most part.

Re: How are types related to classes and roles?

2005-02-24 Thread Larry Wall
On Fri, Feb 25, 2005 at 12:45:45AM +0800, Autrijus Tang wrote: : On Wed, Feb 23, 2005 at 12:17:19PM -0800, Larry Wall wrote: : > : And how does all this combine with the notion of context? : > : > Lazily, for the most part. In some cases we can determine context at : > compile time, but often not

Re: How are types related to classes and roles?

2005-02-24 Thread Aaron Sherman
On Thu, 2005-02-24 at 12:42, Larry Wall wrote: > On Fri, Feb 25, 2005 at 12:45:45AM +0800, Autrijus Tang wrote: > : On Wed, Feb 23, 2005 at 12:17:19PM -0800, Larry Wall wrote: > : > Certainly a subroutine cannot determine > : > what context it was called in until it's actually called, unless we > :

scoping functions as list operators?

2005-02-24 Thread Stéphane Payrard
Giving scoping functions the status of list operators would allow to drop parentheses when not used in conjunction with initializer so one could write: my $a, $b, $c; instead of my ($a, $b, $c); Most people use scoping functions as the top most function of the corresponding statement AST s

Re: scoping functions as list operators?

2005-02-24 Thread Luke Palmer
StÃphane Payrard writes: > > Giving scoping functions the status of list operators > would allow to drop parentheses when not used in conjunction > with initializer so one could write: > > my $a, $b, $c; > > instead of > > my ($a, $b, $c); Hmm, but that kills the Perl 5 ability to do conci

Re: scoping functions as list operators?

2005-02-24 Thread Stéphane Payrard
On Fri, Feb 25, 2005 at 03:56:06AM +0100, Stéphane Payrard wrote: > > Giving scoping functions the status of list operators > would allow to drop parentheses when not used in conjunction > with initializer so one could write: > > my $a, $b, $c; > > instead of > > my ($a, $b, $c); Too bad t

Re: How are types related to classes and roles?

2005-02-24 Thread Stéphane Payrard
On Thu, Feb 24, 2005 at 09:42:30AM -0800, Larry Wall wrote: > > Anyway, I don't profess to have thought deeply about type inferencing. > But I do know that I don't want to turn Perl 6 into ML just yet... > > Larry > Speaking of ML, it appears to me that Perl6 rules are a mechanism that can act

Re: scoping functions as list operators?

2005-02-24 Thread Uri Guttman
> "SP" == Stéphane Payrard <[EMAIL PROTECTED]> writes: SP> On Fri, Feb 25, 2005 at 03:56:06AM +0100, Stéphane Payrard wrote: >> >> Giving scoping functions the status of list operators >> would allow to drop parentheses when not used in conjunction >> with initializer so one could w

Re: scoping functions as list operators?

2005-02-24 Thread Rod Adams
Luke Palmer wrote: We have discussed making equals low precedence enough to eliminate the parentheses in the standard swap: $x, $y = $y, $x; $x, $y <== $y, $x; -- Rod Adams

Re: scoping functions as list operators?

2005-02-24 Thread Stéphane Payrard
On Thu, Feb 24, 2005 at 11:09:24PM -0500, Uri Guttman wrote: > > "SP" == Stéphane Payrard <[EMAIL PROTECTED]> writes: > > SP> On Fri, Feb 25, 2005 at 03:56:06AM +0100, Stéphane Payrard wrote: > >> > >> Giving scoping functions the status of list operators > >> would allow to drop pare

Re: scoping functions as list operators?

2005-02-24 Thread Luke Palmer
Rod Adams writes: > Luke Palmer wrote: > > >We have discussed making equals low precedence enough to eliminate the > >parentheses in the standard swap: > > > > $x, $y = $y, $x; > > > $x, $y <== $y, $x; Heh, oh yeah. I guess I wasn't so off suggesting <-, then. Well, there's half the problem.

Re: scoping functions as list operators?

2005-02-24 Thread Uri Guttman
> "LP" == Luke Palmer <[EMAIL PROTECTED]> writes: LP> Rod Adams writes: >> Luke Palmer wrote: >> >> >We have discussed making equals low precedence enough to eliminate the >> >parentheses in the standard swap: >> > >> > $x, $y = $y, $x; >> > >> $x, $y <== $y, $x; LP> He

Re: scoping functions as list operators?

2005-02-24 Thread Rod Adams
Luke Palmer wrote: Now we just need to determine if 'my' can leave its post as a unary declarator. Don't see why not... If you ever need it unary, you can just put the () back in. The question becomes which is more common: Scoping a single variable in a list context, or scoping several variab

Re: scoping functions as list operators?

2005-02-24 Thread Rod Adams
Uri Guttman wrote: that fixes Stéphane's problem with my yall proposal. and yall solves the unary my problem. :) Stop misusing "y'all" before this Texan has to hurt you. And y'all wonder why we hate you damn yankees. Can't even speak properly up there. :-) We should instead have a list attribu

Re: scoping functions as list operators?

2005-02-24 Thread Uri Guttman
> "RA" == Rod Adams <[EMAIL PROTECTED]> writes: RA> Uri Guttman wrote: >> that fixes Stéphane's problem with my yall proposal. and yall solves the >> unary my problem. :) >> >> RA> Stop misusing "y'all" before this Texan has to hurt you. RA> And y'all wonder why we hate you dam

Re: scoping functions as list operators?

2005-02-24 Thread Patrick R. Michaud
On Fri, Feb 25, 2005 at 12:54:20AM -0500, Uri Guttman wrote: > > "RA" == Rod Adams <[EMAIL PROTECTED]> writes: > > RA> Uri Guttman wrote: > >> that fixes Stéphane's problem with my yall proposal. and yall solves the > >> unary my problem. :) > >> > RA> Stop misusing "y'all" before t

Re: scoping functions as list operators?

2005-02-24 Thread Struan Judd
Luke Palmer wrote: > I don't think it's a good idea to make a new low precedence assignment. > Let's say we made it <-. Does that imply that there is also > low-precedence binding :<- and compile-time binding ::<- ? Those don't > look right. I think we're weighing making good ol' assignment low

Re: scoping functions as list operators?

2005-02-24 Thread Uri Guttman
> "PRM" == Patrick R Michaud <[EMAIL PROTECTED]> writes: PRM> On Fri, Feb 25, 2005 at 12:54:20AM -0500, Uri Guttman wrote: >> > "RA" == Rod Adams <[EMAIL PROTECTED]> writes: >> RA> Uri Guttman wrote: >> >> that fixes Stéphane's problem with my yall proposal. and yall solves the