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

Re: Time to update POSIX.pm?

Thread Previous | Thread Next
From:
Mark Overmeer
Date:
January 30, 2011 11:07
Subject:
Re: Time to update POSIX.pm?
Message ID:
20110130190705.GA20802@moon.overmeer.net
* Eric Brine (ikegami@adaelis.com) [110130 02:46]:
> On Sat, Jan 29, 2011 at 5:48 PM, Mark Overmeer <mark@overmeer.net> 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?
-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark@Overmeer.net                          solutions@overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About