use Perl
All the Perl that's Practical to Extract and Report
http://use.perl.org/

Title    5.12 proposals
Date    2008.01.11 18:29
Author    brian_d_foy
Topic   
http://use.perl.org/article.pl?sid=08/01/11/2311212

Now that 5.10 is out, rjbs and I have fired off a bunch of proposals for 5.12 features to p5p. These are things which should be dead obvious, at least on the surface.

rjbs proposed...

Was I called as a method? A caller() extension so a routine can tell if it was called as a method or not.

Lexical named subroutines:

my sub foo {...}
to take over from

my $foo = sub { ... };
. Yes please, I'll take 10.

Anonymous packages: Yep, a namespace with no name.

I've proposed...

Named subroutine parameters:

sub foo ($this, $that) { ... }
Oh god please can we? The idea is to start simple and obvious and build out from there. Discussion is positive and lively. There's lots of small, but very important, details to work out.

method declaration:

method foo { return $self->{foo} }
No more my $self = shift;!

Links

  1. "Was I called as a method?" - http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-01/msg00438.html
  2. "Lexical named subroutines" - http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-01/msg00439.html
  3. "Anonymous packages" - http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-01/msg00440.html
  4. "Named subroutine parameters" - http://www.perlfoundation.org/perl5/index.cgi?named_parameter_proposal
  5. "method declaration" - http://www.perlfoundation.org/perl5/index.cgi?method_keyword_proposal

© Copyright 2012 - pudge, All Rights Reserved

printed from use Perl, 5.12 proposals on 2012-02-08 18:05:35