Blog
019443th since April 04, 2007
R
Nov 30, 2007 ( Friday )
( 154 )
Perl 5.10 is coming
Perl 5.10 new features

Read from a Perlmonks thread and some suggested links. my first impressions about the coming Perl 5.10:

1) Some new features:
  * new keyword say, an addon to print
  * new operator //, fixed definedness problem with || operator
  * Stackable File test, -f -w -z $file with one shot
  * new State varable with state keyword, works like static in C, previously implemented with closure and is not necessary now.
  * new lexically-scoped feature %H
  * Smart matching with ~~ (looks cool)
  * given + when.. finally, Perl has its own switch...case
  * Inside-out Object (no experience)
  * field hash: use reference as hash key and more..

2) Regex:
  * named captures (?<name>pat) (?'name'pat) and \k<name> \k'name'
  * new hash %+ (nice)
  * possessive quantifiers /(?>x+)/ to /x++/ ..
  * new back-reference syntax \1 => \g{1} backreference \g{-1}
  * dynamic pattern to recursive pattern (?1), (?R), (?0) <-- PHP feature
  * (?&name), (?(DEFINE)...) (nice)
  * relative referencing (?-1) (?+1) (nice)
  * backtracking control verbs (nice)
  * /p modifier with using $`, $&, $'
  * internal:
      * recursive engine to iterative engine
      * trie optimisation on regex alternations
      * [..] treated as literals
      * and more....

For Regex engine, besides adding some features that already existed in the progeammin world(i.e. named captures, recursive pattern), more fine controls like backtracking control verbs are quite attractive..

A short-phrase: no drama, more convenience or tricks for the programmers.

References:
[1] http://www.slideshare.net/rjbs/perl-510-for-people-who-arent-totally-insane
[2] http://www.slideshare.net/acme/whats-new-in-perl-510
[3] http://www.regex-engineer.org/slides/img0.html
Add tags: 5.10 Perl

by xicheng
19:05:47 | Add a comment | Modify entry | Ask xicheng

Comments:

xicheng says:
Perl 5.10 has arrived and can be downloaded from CPAN

what's new for Perl 5.10.0 from CPAN documentation.
At 22:33 Dec 20, 2007 EDT | Modify comment
Add a comment:

Read the Guidance for the first time users

Need browser cookie to submit properly

Name:
Code: