New prototype accepted; next patch almost done

My patch for a new perl prototype was accepted and should be in Perl 5.13.7 in November. From the change log:

Add single-term prototype

The C<+> prototype is a special alternative to C<$> that will act like
C<\[@%]> when given a literal array or hash variable, but will otherwise
force scalar context on the argument. This is useful for functions which
should accept either a literal array or an array reference as the argument

I've finished most of the hard work on my next patch, which would allow push/pop/keys/values/etc to act directly on references of an appropriate type. Now, I'm drafting the email that explains the change and the rationale and hope to submit it to the p5p list later this week.

If you liked what I was proposing in some of my recent posts on the topic, keep your fingers crossed that any debate on it is mild and constructive and we'll have some new, cool features in Perl for either Thanksgiving or Christmas.

This entry was posted in p5p, perl programming and tagged , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

One Comment

  1. mirod
    Posted October 26, 2010 at 4:18 am | Permalink

    Thank you. Having to explicitly dereference and especially having pepper my code with ugly curly brackets around variables has always been my main gripe about Perl's syntax. Your work on this is very, very cool.