Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Damian Conway
> Please tell me there will be a way to work out if you're called as a > subroutine or as a method. Yes. Subroutines and methods will inhabit different namespaces (modules and classes respectively): module X; sub s { print "I am the very model of a modern Perl 6 subroutine

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > >> And package::subroutine should go the way of package`subroutine > as > >> package.subroutine will work and become the preferred method :), > no? > > > Err...no. They're still not the same thing in Perl 6: > > package::subroutine(

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Damian Conway
> So a class method and a plain function call are still not the same > thing? Correct. Damian

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Bart Lateur
On Thu, 4 Oct 2001 14:33:54 +1000 (EST), Damian Conway wrote: >To: [EMAIL PROTECTED] >Subject: Re: A3, the ';' operator, and hyper-operators >From: Damian Conway <[EMAIL PROTECTED]> >Date: Thu, 4 Oct 2001 14:33:54 +1000 (EST) > > > > And package:

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Bart Lateur
On Fri, 5 Oct 2001 06:00:07 +1000 (EST), Damian Conway wrote: > > $foo + $bar > > > > will call $foo's overloaded add if it has one no matter where $foo's used. > >Sorry. I should have been clearer. > >Dan is, of course, correct. Overloaded operators that are class methods >will tag al

Re: A3, the ';' operator, and hyper-operators

2001-10-04 Thread Damian Conway
> At 02:18 PM 10/4/2001 +1000, Damian Conway wrote: > >> ** Miscellaneous > >> > >> Why 'operator:+' instead of 'operator::+'? (Other than the > >> potential verbosity required to declare operators within a > >> particular package.) I would think it more int

Re: A3, the ';' operator, and hyper-operators

2001-10-04 Thread Mark J. Reed
On Thu, Oct 04, 2001 at 11:17:38AM -0400, John Siracusa wrote: > Hmmm...does anyone else remember when the suggestion that '.' continue to be > used as the concat operator in Perl 6 was shouted down because it would > require space on either side of it? It seems to me that we've come full > circl

Re: A3, the ';' operator, and hyper-operators

2001-10-04 Thread John Siracusa
AP3 says: > So, instead of: > >$a . $b . $c > > you'll say: > >$a _ $b _ $c > > The only downside to that is the space between a variable name and > the operator is required. This is to be construed as a feature. On 10/4/01 12:18 AM, Damian Conway wrote: >> sub _mysub {} >> $a = _mysub; >

Re: A3, the ';' operator, and hyper-operators

2001-10-04 Thread Dan Sugalski
At 02:18 PM 10/4/2001 +1000, Damian Conway wrote: >> ** Miscellaneous >> >> Why 'operator:+' instead of 'operator::+'? (Other than the >> potential verbosity required to declare operators within a >> particular package.) I would think it more intuitive to think of >> 'opera

Re: A3, the ';' operator, and hyper-operators

2001-10-04 Thread Graham Barr
On Wed, Oct 03, 2001 at 11:26:17PM -0500, Jonathan Scott Duff wrote: > On Thu, Oct 04, 2001 at 01:24:13PM +1000, Damian Conway wrote: > > >From E3: > > > > The doubling also helps it stand out better in code, in part > > because it forces you to put space around the C<::> so that

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Damian Conway
> And package::subroutine should go the way of package`subroutine as > package.subroutine will work and become the preferred method :), no? Err...no. They're still not the same thing in Perl 6: package::subroutine(@args) --> package::subroutine(@args) package.subroutine

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Damian Conway
> So does that mean that the Perl5 meaning of > >@refs = \($a, $b, $c); > > will go away? I doubt it. > It seems like it should as it's a caretless hyper. Not really. Or, at least, no more so than C or C or C is. Hyperoperators apply to *arrays* not lists. What w

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Jonathan Scott Duff
On Thu, Oct 04, 2001 at 01:24:13PM +1000, Damian Conway wrote: > >From E3: > > The doubling also helps it stand out better in code, in part > because it forces you to put space around the C<::> so that it's > not confused with a package name separator. And package::subrou

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Bryan C . Warnock
On Thursday 04 October 2001 12:18 am, Damian Conway wrote: >> ** Binary // >> >> Was a test for definedness *and* truthfulness considered? > > Err... the || operator *is* a test for that. Hmmph. So it is. All those wasted keystrokes that I'll never recover... how depressing. -- B

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Jonathan Scott Duff
On Thu, Oct 04, 2001 at 01:31:09PM +1000, Damian Conway wrote: > @refs = ^\ @list; So does that mean that the Perl5 meaning of @refs = \($a, $b, $c); will go away? It seems like it should as it's a caretless hyper. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Damian Conway
Bryan asked: > What about filetests that already return something meaningful? I'll > assume that they still behave the same. (And thus, shouldn't be > chained. Unless you're doing something weird.) Yep. > It's also mentioned that they don't short-circuit, so what do > post-failu

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Jeremy Howard
> Imagine: > > @strings ^=~ s/pattern/replacement/; > > @refs = ^\ @list; > > @objects^.method(); > > @values^++; > Both text-processing and number-crunching examples are here: http://dev.perl.org/rfc/82.html#EXAMPLES Adding the '^' before each operator is left as an exercise for the reade

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Bryan C . Warnock
** Discussion for RFC 320: What about filetests that already return something meaningful? I'll assume that they still behave the same. (And thus, shouldn't be chained. Unless you're doing something weird.) It's also mentioned that they don't short-circuit, so what do post-failure tests te

RE: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Damian Conway
> > And I didn't see anything about you being able to hyper =, > > so ^= ought to be alright too. > > I would expect > >@a ^= 1; # sets default value for (all elems of) @a >@a ^+= 1; # increments each element of @a > > etc. Yep. AFAIK *every* operator (exce

RE: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Damian Conway
> Set in stone, huh? Hmm. It may affect the parsing, but I'm not sure. > Perhaps we can Arbitrarily Declare that an underscore isn't allowed as > the last character of a symbol. That way, you can still do $foo_$bar > without worrying about whitespace. I doubt it. From E3:

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Damian Conway
> PS: I'm getting excited about the announcement of _sample_ code for a > language _design_... That's kinda 'meta-vaporware' isn't it? Where did > things go so wrong... ;-) I've found it a real challenge to write that sort of code. It's an constantly (and unsteadily) moving target, I

RE: A3, the ';' operator, and hyper-operators

2001-10-03 Thread David Whipp
Brent Dax wrote: > And I didn't see anything about you being able to hyper =, > so ^= ought to be alright too. I would expect @a ^= 1; # sets default value for (all elems of) @a @a ^+= 1; # increments each element of @a etc. Dave. -- Dave Whipp, Senior Verification Engineer,

RE: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Brent Dax
Damian Conway: #> # solitary underscore for that. So, instead of: #> # $a . $b . $c you'll say: #> # $a _ $b _ $c The only downside to that is the # space between a #> # variable name and the #> # operator is required. This is to be construed as a feature. #> #>

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Jeremy Howard
Damian Conway wrote: >> But... earlier messages from >> Larry suggested that the hyper-operator symbol would actually be an adverb >> (back then ':' was being proposed, IIRC), which sounded even more >> exciting... Is this still the plan, with more to come in later apocolypses >

RE: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Damian Conway
> # solitary underscore for that. So, instead of: > # $a . $b . $c you'll say: > # $a _ $b _ $c The only downside to that is the space between a > # variable name and the > # operator is required. This is to be construed as a feature. > > Ouch. Although I don't wish

Re: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Damian Conway
> I haven't seen it mentioned here yet, so for those who haven't > noticed A3 is now out: > http://www.perl.com/pub/a/2001/10/02/apocalypse3.html And Exegesis 3 will follow within 24 hours. > But... earlier messages from > Larry suggested that the hyper-operator symbol would actu

RE: A3, the ';' operator, and hyper-operators

2001-10-03 Thread Brent Dax
# Binary _ # Since . is taken for method calls, we need a new way to concatenate strings. We'll use a # solitary underscore for that. So, instead of: # # $a . $b . $c you'll say: # # $a _ $b _ $c The only downside to that is the space between a variable name and the # operator is required.

A3, the ';' operator, and hyper-operators

2001-10-03 Thread Jeremy Howard
I haven't seen it mentioned here yet, so for those who haven't noticed A3 is now out: http://www.perl.com/pub/a/2001/10/02/apocalypse3.html There's a lot to like here. I'll just cover 2 points for now though... Larry's discussion of RFC 082, while not quite complete, does a great job of learni