Re: $^a, $^b, and friends

2002-04-06 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > Piers Cawley writes: > : In a use.perl post not far away I sketched out something like the following: > : > : module foo is Mixin { > : > : sub category($category, &block) { > : &block.abstract_syntax_tree.walk_with -> $node { > :

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Larry Wall wrote : > > It's not clear that the lexer is a separate entity any more. Lexers > were originally invented as a way of abstracting out part of the > grammar so that it could be done in a separate pass, and to simplify > the grammar for the poor overworked parser. Indeed. Another bene

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Dan Sugalski wrote in perl.perl6.language : > > Don't forget, we already change parsing rules at compile time. Perl's > got three (maybe four) different sets of rules as it is: > >*) Normal perl >*) Regexes >*) Double-quoted strings >*) Single-quoted strings > > Adding another,

Re: $^a, $^b, and friends

2002-04-06 Thread Larry Wall
Piers Cawley writes: : In a use.perl post not far away I sketched out something like the following: : : module foo is Mixin { : : sub category($category, &block) { : &block.abstract_syntax_tree.walk_with -> $node { : when AST::Method { : .attrib(cat

Re: $^a, $^b, and friends

2002-04-06 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > Rafael Garcia-Suarez writes: > : Larry Wall wrote in perl.perl6.language : > : > > : > Such a grammar switching routine could operate either over a lexical > : > scope or over the rest of the file. The only restriction is that > : > one module not clobbe

Re: $^a, $^b, and friends

2002-04-06 Thread Larry Wall
Rafael Garcia-Suarez writes: : Larry Wall wrote in perl.perl6.language : : > : > Such a grammar switching routine could operate either over a lexical : > scope or over the rest of the file. The only restriction is that : > one module not clobber the grammar of a different module. : > : > Basica

Re: $^a, $^b, and friends

2002-04-06 Thread Dan Sugalski
At 2:34 PM -0700 4/5/02, Luke Palmer wrote: > > You can do anything you like if you mess with the parser. Changing >> the rules for recognizing an identifier would be trivial. > >Does this refer to messing with the parser... compile time (that is, when >Perl compiles, not when Perl is compiled)

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Larry Wall wrote in perl.perl6.language : > > Such a grammar switching routine could operate either over a lexical > scope or over the rest of the file. The only restriction is that > one module not clobber the grammar of a different module. > > Basically, we're trying to make the opposite mist

Re: $^a, $^b, and friends

2002-04-05 Thread Larry Wall
Luke Palmer writes: : > You can do anything you like if you mess with the parser. Changing : > the rules for recognizing an identifier would be trivial. : : Does this refer to messing with the parser... compile time (that is, when : Perl compiles, not when Perl is compiled)? Or are you actually

Re: $^a, $^b, and friends

2002-04-05 Thread Luke Palmer
> You can do anything you like if you mess with the parser. Changing > the rules for recognizing an identifier would be trivial. Does this refer to messing with the parser... compile time (that is, when Perl compiles, not when Perl is compiled)? Or are you actually talking about screwing with

Re: $^a, $^b, and friends

2002-04-05 Thread Damian Conway
Larry wrote: > Yes, you can use anything with the letter or number property in > identifiers, plus you can use ideographs. As it happens, the Kanji > for "one" and "two" come in the right order, but don't try to extend > that to "three". Of course, exactly the same thing is true for the English

Re: $^a, $^b, and friends

2002-04-05 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > Piers Cawley writes: > : Larry Wall <[EMAIL PROTECTED]> writes: > : > : > Dan Sugalski writes: > : > : >Strict, but doesn't really matter. Nobody sane will use anything other > : > : >than $^a and $^b. > : > : > : > : Well Are we allowing non-latin

Re: $^a, $^b, and friends

2002-04-05 Thread Larry Wall
Piers Cawley writes: : Larry Wall <[EMAIL PROTECTED]> writes: : : > Dan Sugalski writes: : > : >Strict, but doesn't really matter. Nobody sane will use anything other : > : >than $^a and $^b. : > : : > : Well Are we allowing non-latin characters in identifiers? There : > : may be potential

Re: $^a, $^b, and friends

2002-04-05 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > Dan Sugalski writes: > : >Strict, but doesn't really matter. Nobody sane will use anything other > : >than $^a and $^b. > : > : Well Are we allowing non-latin characters in identifiers? There > : may be potential interesting ramifications with those

Re: $^a, $^b, and friends

2002-04-05 Thread Larry Wall
Dan Sugalski writes: : >Strict, but doesn't really matter. Nobody sane will use anything other : >than $^a and $^b. : : Well Are we allowing non-latin characters in identifiers? There : may be potential interesting ramifications with those. Kanji : specifically, though I don't have details

Re: $^a, $^b, and friends

2002-04-05 Thread Dan Sugalski
At 4:22 PM -0800 4/4/02, Larry Wall wrote: >Dan Sugalski writes: >: At 3:11 PM -0800 4/3/02, Larry Wall wrote: >: >Piers Cawley writes: >: >: Jonathan Scott Duff <[EMAIL PROTECTED]> writes: >: >: >: >: > On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: >: >: >> They are assumed to be de

Re: $^a, $^b, and friends

2002-04-05 Thread Luke Palmer
> Just some thoughts in case you assumed people would only us Perl "for > good". $_='opcpez/xsjuft/qzax/,kvtu/gps/hppe!' ;s&zax&fsm&&&y&b-z,/!&a-y" "&&&!-print;

Re: $^a, $^b, and friends

2002-04-04 Thread Larry Wall
Dan Sugalski writes: : At 3:11 PM -0800 4/3/02, Larry Wall wrote: : >Piers Cawley writes: : >: Jonathan Scott Duff <[EMAIL PROTECTED]> writes: : >: : >: > On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: : >: >> They are assumed to be declared in alphabetical order. Whoa! you say, : >:

Re: $^a, $^b, and friends

2002-04-04 Thread Dan Sugalski
At 3:11 PM -0800 4/3/02, Larry Wall wrote: >Piers Cawley writes: >: Jonathan Scott Duff <[EMAIL PROTECTED]> writes: >: >: > On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: >: >> They are assumed to be declared in alphabetical order. Whoa! you say, >: >> that could get confusing. It s

Re: $^a, $^b, and friends

2002-04-03 Thread Damian Conway
Piers Cawley wrote: > > Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > > > On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: > >> They are assumed to be declared in alphabetical order. Whoa! you say, > >> that could get confusing. It surely can. But if you're doing > >> something

Re: $^a, $^b, and friends

2002-04-03 Thread Damian Conway
Jonathan Scott Duff wrote: > > On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: > > Reading EX4 and seeing those "place-holder" variables made me wonder what > > happens when someone (probably Damian ;) wants to use more than 26 of them. > > Do the place-holder names scale up as if

Re: $^a, $^b, and friends

2002-04-03 Thread Larry Wall
Piers Cawley writes: : Jonathan Scott Duff <[EMAIL PROTECTED]> writes: : : > On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: : >> They are assumed to be declared in alphabetical order. Whoa! you say, : >> that could get confusing. It surely can. But if you're doing : >> something c

Re: $^a, $^b, and friends

2002-04-03 Thread Piers Cawley
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: >> They are assumed to be declared in alphabetical order. Whoa! you say, >> that could get confusing. It surely can. But if you're doing >> something complicated enough that alphabetic

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote: > They are assumed to be declared in alphabetical order. Whoa! you say, > that could get confusing. It surely can. But if you're doing > something complicated enough that alphabetical order would be > confusing, don't use this shorthan

Re: $^a, $^b, and friends

2002-04-03 Thread Larry Wall
[EMAIL PROTECTED] writes: : On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: : > Reading EX4 and seeing those "place-holder" variables made me wonder what : > happens when someone (probably Damian ;) wants to use more than 26 of them. : > Do the place-holder names scale up as if they

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 12:19:13PM -0700, Luke Palmer wrote: > On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: > > Reading EX4 and seeing those "place-holder" variables made me wonder what > > Where is EX4? It's not at perl.org... so... ?? Well, it's linked to from use.perl.org an

Re: $^a, $^b, and friends

2002-04-03 Thread Luke Palmer
On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: > Reading EX4 and seeing those "place-holder" variables made me wonder what Where is EX4? It's not at perl.org... so... ??

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: > Reading EX4 and seeing those "place-holder" variables made me wonder what > happens when someone (probably Damian ;) wants to use more than 26 of them. > Do the place-holder names scale up as if they're being automagically > incremen

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 12:53:33PM -0500, John Siracusa wrote: > So it's the order that they appear that determines their binding? How would > something like this (Perl 5 code) be represented: > > sub reverse_minus { $_[1] - $_[0] } > > I would have guessed it'd be: > > { $^b - $^a } >

Re: $^a, $^b, and friends

2002-04-03 Thread John Siracusa
On 4/3/02 12:49 PM, Jonathan Scott Duff wrote: > On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: >> Reading EX4 and seeing those "place-holder" variables made me wonder what >> happens when someone (probably Damian ;) wants to use more than 26 of them. >> Do the place-holder names s

Re: $^a, $^b, and friends

2002-04-03 Thread Jonathan Scott Duff
On Wed, Apr 03, 2002 at 12:41:13PM -0500, John Siracusa wrote: > Reading EX4 and seeing those "place-holder" variables made me wonder what > happens when someone (probably Damian ;) wants to use more than 26 of them. > Do the place-holder names scale up as if they're being automagically > incremen

$^a, $^b, and friends

2002-04-03 Thread John Siracusa
Reading EX4 and seeing those "place-holder" variables made me wonder what happens when someone (probably Damian ;) wants to use more than 26 of them. Do the place-holder names scale up as if they're being automagically incremented? (e.g. ..., y, z, aa, ab, ...) -John