RE: http://archive.develooper.com/perl6-announce-rfc@perl.org/msg00318.html

2002-04-05 Thread James Ryley
How 'bout: $foo = 'def'; $bar = 'ghi'; $y = 'abc$foo$bar'; $z = eval qq{$y}; Of course, for security and correctness reasons, you'd probably want to: $y =~ s/\\//g; $y =~ s/!/\\/g; Why would \\t not double-interpolate to a tab? Also, why would \\ not double

Re: http://archive.develooper.com/perl6-announce-rfc@perl.org/msg00318.html

2002-04-05 Thread Luke Palmer
On 4 Apr 2002, Aaron Sherman wrote: On Thu, 2002-04-04 at 11:09, Luke Palmer wrote: On Thu, 4 Apr 2002, James Ryley wrote: How 'bout: $foo = 'def'; $bar = 'ghi'; $y = 'abc$foo$bar'; $z = eval qq{$y}; Of course, for security and correctness reasons, you'd probably want to:

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!' ;szaxfsmyb-z,/!a-y !-print;

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 declared in

Re: classes, interfaces, properties and 'is'

2002-04-05 Thread Melvin Smith
At 07:12 AM 4/5/2002 +1000, Damian Conway wrote: Melvin Smith wrote: More generally, it also depends whether you think of out-of-band properties as nouns or adjectives. For example: class Toaster is silver is shiny is hot is little {...} vs: After rereading the example, this one bugs

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:http://archive.develooper.com/perl6-announce-rfc@perl.org/msg00318.html

2002-04-05 Thread Aaron Sherman
On Fri, 2002-04-05 at 09:30, Luke Palmer wrote: On 4 Apr 2002, Aaron Sherman wrote: $z = interpolate interpolate $y; Then you have ultimate control. Uhm, I disagree. I think you really get ultimate control _without_ interpolate. Some people might want to make \\t interpolate to

Re: http://archive.develooper.com/perl6-announce-rfc@perl.org/msg00318.html

2002-04-05 Thread Luke Palmer
By ultimate control, I meant that if you have an interpolate command, you can then do whatever you want at each stage. You could do: $z = interpolate interpolate $y; Good point. Well, we were brainstorming macros for a reason ;). But an efficient version would be nice, I suppose.

Re: classes, interfaces, properties and 'is'

2002-04-05 Thread Larry Wall
Melvin Smith writes: : At 07:12 AM 4/5/2002 +1000, Damian Conway wrote: : Melvin Smith wrote: : More generally, it also depends whether you think of out-of-band properties as : nouns or adjectives. For example: : : class Toaster is silver is shiny is hot is little {...} : : vs: : :

$i := 1;

2002-04-05 Thread Rich Morin
At a recent talk, Larry showed a line of code that was something like: (@a; @b; @c) := (@x; @y; 1,2,3); I'm curious about the mapping of @c to a list of constants; if I write @c[0]++; am I bumping the value of 1? As it happens, this used to be the case on some old Fortrans that used

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. Kanji

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: 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

Re: $i := 1;

2002-04-05 Thread Damian Conway
At a recent talk, Larry showed a line of code that was something like: (a; b; c) := (x; y; 1,2,3); I'm curious about the mapping of c to a list of constants; if I write c[0]++; am I bumping the value of 1? No. We've learnt that lesson, at least :-) My understanding is that:

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 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

Ex4 smart match question

2002-04-05 Thread jadams01
Does one of these items not belong? From Exegesis 4: This new turbo-charged 'smart match' operator will also work on arrays, hashes and lists: if array =~ $elem {...}# true if array contains $elem if $key =~ %hash {...} # true if %hash{$key} if $value

Tail Recursion optimization

2002-04-05 Thread Piers Cawley
So, here I am working on a Scheme interpreter in Perl 6, and I'm trying to write it in a (for want of a better description) 'Scheme-like' fashion with lots of recursion. The trouble is, unless Perl6 is going to be guaranteed to do optimization of tail calls, this is going to lead to horribly

Re: Ex4 smart match question

2002-04-05 Thread Luke Palmer
On Fri, 5 Apr 2002 [EMAIL PROTECTED] wrote: Does one of these items not belong? From Exegesis 4: This new turbo-charged 'smart match' operator will also work on arrays, hashes and lists: if @array =~ $elem {...}# true if @array contains $elem if $key =~ %hash

Re: Tail Recursion optimization

2002-04-05 Thread Larry Wall
Piers Cawley writes: : So, here I am working on a Scheme interpreter in Perl 6, and I'm : trying to write it in a (for want of a better description) : 'Scheme-like' fashion with lots of recursion. : : The trouble is, unless Perl6 is going to be guaranteed to do : optimization of tail calls,

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

Questions about private variables

2002-04-05 Thread Joe Gottman
I just read Exegesis 4, and I have a few questions about private variables. First, is it possible to have 2 private variables of the same name in different functions? For instance, what would happen in the following code? sub func1() { our $varname is private \\= 1; return

Re: Questions about private variables

2002-04-05 Thread Piers Cawley
Damian Conway [EMAIL PROTECTED] writes: Joe Gottman wrote: For instance, what would happen in the following code? sub func1() { our $varname is private \\= 1; return $varname; } sub func2() { our $varname is private \\= 2; Fatal error: Private variable $varname declared