Re: Auto My?

2004-12-21 Thread Michele Dondi
On Mon, 20 Dec 2004, James Mastros wrote: OTOH, I realize now you can do that with zip in P6, in which case you do have a mention of the whole variable to stick a my on -- Cmy %foo = zip(@keys, @values); I think Cmy [EMAIL PROTECTED] = @values; reads better though, even though looking at it

Re: Auto My?

2004-12-20 Thread James Mastros
Luke Palmer wrote: James Mastros writes: Does this imply that it's now possible to type Cmy @foo[23] = 42;, and declare @foo? In the current perl, this doesn't work -- it's a syntax error. It'd certainly make many constructs easier. That looks weird to me. But as Rod points out, it can be

Re: Auto My?

2004-12-20 Thread Mark J. Reed
On 2004-12-19 at 21:35:46, Luke Palmer wrote: In Perl 5 you can do the hackish: (\my @foo)-[23] = 42; Hm. My reaction to the above is, and I think I speak for the entire assemblage when I say this, Yuckbo. :) Now, (my @foo)[23] would be somewhat better, but of course, that's

Re: Auto My?

2004-12-20 Thread Juerd
James Mastros skribis 2004-12-19 23:00 (+0100): Juerd wrote: Just typing my before the first use of a variable isn't hard, and it makes things much clearer for both the programmer and the machine. Does this imply that it's now possible to type Cmy @foo[23] = 42;, and declare @foo? In the

Re: Auto My?

2004-12-20 Thread Larry Wall
On Sun, Dec 19, 2004 at 08:25:58PM -0600, Rod Adams wrote: : Another facet of this discussion comes into account when also specifying : type. : : from S9: : my bit @bits; : my int @ints; : my num @nums; : my int4 @nybbles; : my str @buffers; : my ref[Array] @ragged2d; : my complex128

Re: Auto My?

2004-12-19 Thread James Mastros
Juerd wrote: Just typing my before the first use of a variable isn't hard, and it makes things much clearer for both the programmer and the machine. Does this imply that it's now possible to type Cmy @foo[23] = 42;, and declare @foo? In the current perl, this doesn't work -- it's a syntax

Re: Auto My?

2004-12-19 Thread Rod Adams
James Mastros wrote: Juerd wrote: Just typing my before the first use of a variable isn't hard, and it makes things much clearer for both the programmer and the machine. Does this imply that it's now possible to type Cmy @foo[23] = 42;, and declare @foo? In the current perl, this doesn't work

Re: Auto My?

2004-12-19 Thread chromatic
On Sun, 2004-12-19 at 20:25 -0600, Rod Adams wrote: One of the other reasons in favor of the idea was aesthetic. # stuff which declares $x, $z, and $q $x = 4; my $y = 7; $z = 12; my $r = 4543; $q = 121; compared to: # stuff which declares $x, $z, and $q $x = 4; $y = 7; $z =

Auto My?

2004-12-18 Thread Rod Adams
Considering that proper and common usage, not to mention strictures, dictates a heavy insistence on 'my'. I will thus assume that creation of lexical variables with 'my' far out numbers the creation of package space globals. Should we not then have it where it's the default behavior, and

Re: Auto My?

2004-12-18 Thread Luke Palmer
Rod Adams writes: Considering that proper and common usage, not to mention strictures, dictates a heavy insistence on 'my'. I will thus assume that creation of lexical variables with 'my' far out numbers the creation of package space globals. Should we not then have it where it's the default

Re: Auto My?

2004-12-18 Thread Juerd
Rod Adams skribis 2004-12-18 14:55 (-0600): Considering that proper and common usage, not to mention strictures, dictates a heavy insistence on 'my'. I will thus assume that creation of lexical variables with 'my' far out numbers the creation of package space globals. Should we not then

Re: Auto My?

2004-12-18 Thread JOSEPH RYAN
- Original Message - From: Luke Palmer [EMAIL PROTECTED] Date: Saturday, December 18, 2004 4:16 pm Subject: Re: Auto My? Rod Adams writes: There are pros and cons, and it basically ends up being a design choice. Well, at least when strictures are on. When they are off, the coder

Re: Auto My?

2004-12-18 Thread Luke Palmer
JOSEPH RYAN writes: As bad of an idea that I think this is, I wonder if Perl6's reflection capabilities will be powerful enough to where a module/pragma could be written that would be able to do this? For instance, one idea was: lexically change the current grammar to a subclass of the