5.12 proposals

schwern on 2008-01-11T12:13:24

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


Perl 5 is innovative again

jdavidb on 2008-01-11T14:22:42

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.

Re:Perl 5 is innovative again

dagolden on 2008-01-11T19:36:03

That was my thought. Perl 5 should backport as much syntax and semantics as can be.

-- dagolden

Junctions!

brian_d_foy on 2008-01-11T23:13:14

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. :)

Called as method

richardc on 2008-01-12T00:40:36

Done as part of Devel::Caller, some time ago.