[Memphis.pm] perl 6 apocalypse

Brock Sides philarete at mindspring.com
Sat May 12 18:16:35 CDT 2001


If you're interested in getting a glimpse of the future of Perl,
www.perl.com has parts one and two of Larry's "Perl 6 Apocalypse", a
revelation of things to come.

Larry has organized the Perl 6 RFCs according to the chapters of the
Camel Book. Apocalypse 1 corresponds to chapter 1, Apocalypse Two to
chapter 2, etc. He provides comments on each RFC, rating the problem the
RFC addresses, the solution it proposes, and saying to what degree that
solution will be incorporated into Perl 6.

One of the more shocking changes to come: the funny characters $, @, and
%, will become part of the variable name. This means that no longer will
you access the 4th member of the array @foo with $foo[3] -- instead,
you'll use @foo[3]. And to get at the value associated with the key
'bar' in the hash %foo, you'll use %foo{'bar'}, not $foo{bar}. This, of
course, necessitates a change to the notation for slices, which has yet
to be revealed.

Another surprising change: angle brackets will no longer be the operator
for "get the next line from a filehandle". Instead, they will take the
place of qw(). In fact, filehandles as a separate type will go away
altogether. Filehandles will be yet another object. Instead of saying

while (<STDIN>) { # do stuff }

you'll say 

while ($STDIN) { # do stuff }

Objects that are iterators (like filehandles) will know to set the value
of $_ when in boolean context.

Oh, did I say "boolean context"? This strikes me as the most exciting
change in Perl 6.

You're familiar with the three contexts found in Perl<=5: scalar,
list, and void. Perl 6 will add a whole slew of sub-contexts:

Scalar context
  Boolean context
  Integer context
  Numeric context
  String context
  Object context 
List context
  Flattening list context     
  Non-flattening list context   
  Lazy list context              
  Hash list context            

-- 
Brock Sides
philarete at mindspring.com

The original plan [for GNOME] was to aim to make a desktop as good as 
the Macintosh, and we should not lower our ambition by making one 
merely as good as Windows. -- RMS 
----------------------------------------------------------------------------
To unsubscribe, please send email to majordomo at pm.org
with 'unsubscribe memphis-pm-list' in the body of the message.
----------------------------------------------------------------------------




More information about the Memphis-pm mailing list