develooper Front page | perl.perl5.porters | Postings from January 2011

Re: Time to update

Thread Previous | Thread Next
Mark Overmeer
January 30, 2011 11:07
Re: Time to update
Message ID:
* Eric Brine ( [110130 02:46]:
> On Sat, Jan 29, 2011 at 5:48 PM, Mark Overmeer <> wrote:
> There's no way to simply check parameter list length using "function
> signatures", if by that you mean prototypes,

In the common case you can.  Of course, there are situations where it
does not work.  A prototype of ($$)  works as well as  @_==2

> What about the fancy tricks you added? Prototypes change parsing rules, so
> by definition, it is a backwards incompatible change. For example, your
> changes causes
>      perl -e"use POSIX qw( ); @args=2; POSIX::exit(@args);"
>      to exit with code 1 instead of 2.

Of course.
Let's be realistic, the    exit(@args)   in the original code is a bug.
No-one is his right mind will call exit with multiple values. But you
will certainly be able to produce examples which may exist in reality.

Do you really wish to keep back the evolvement of the language because
you want to stay compatible with (all imaginable) sleeping bugs?


       Mark Overmeer MSc                                MARKOV Solutions                         

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About