Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

schwern (1528)

schwern
  (email not shown publicly)
http://schwern.net/
AOL IM: MichaelSchwern (Add Buddy, Send Message)
Jabber: schwern@gmail.com

Schwern can destroy CPAN at his whim.

Journal of schwern (1528)

Friday January 11, 2008
07:13 AM

5.12 proposals

[ #35362 ]

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;!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Sounds good. I noticed that 5.10.0 seems to make more sweeping changes than the last several releases, and your proposals would carry that even further, I think.

    Maybe Perl 5 will approach Perl 6 asymptotically.

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • That was my thought. Perl 5 should backport as much syntax and semantics as can be.

      -- dagolden
  • I'd like to see junctions, cross operators, and zipping. However, since anything that might be added needs someone to add them and I don't have that kung fu, I'll just hope someone who does have the skillz wants them too. :)
  • Done as part of Devel::Caller [cpan.org], some time ago.