here is a set of minor syntax changes all involving adding the ability
to use my in more places. i think it (or parts of it) should be added to
skud's list. i don't know whether this has to be discussed and/or made
into an rfpc.


1. have grep, map and for modifier support a my $var like for does. 

i don't like using $_ much as i prefer to have names. but those 3
operators force the use of $_. it would be simple to allow them to have
a my $var be used as the iterator.

a big win will be with nested maps/greps. right now you have to assign
the outer loop's $_ to a temp var for use by the inner loop. with my
$var you would save the assignment clutter.

        @matrix = map { $j = $_ ; map [$_, $j], @i_vals } @j_vals ;

becomes

        @matrix = map my $j { map my $i [$i, $j], @i_vals } @j_vals ;

2. my subs

this has been talked about (i don't even know if it is 5.6) but it would
be very useful to be able to have lexical subs for modules.

3. my handles

since file handles will become top level objects, then having lexical
handles will be expected. 5.6 does autovivification of a handle into an
var which has an undefined value. so this is not a major change but i
want to make it consistant with other uses of my. i am not sure if there
needs to be a special syntax for this unless there is something specific
to handles.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

Reply via email to