* 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.netThread Previous | Thread Next