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

Re: [perl #100190] RFE: fix sprintf to be consistent with printf andbe useful!

Thread Previous | Thread Next
Nicholas Clark
November 11, 2011 13:03
Re: [perl #100190] RFE: fix sprintf to be consistent with printf andbe useful!
Message ID:
On Wed, Oct 05, 2011 at 05:20:17PM -0700, Father Chrysostomos via RT wrote:
> On Wed Oct 05 16:13:07 2011, LeonT wrote:
> >  On Wed, Oct 5, 2011 at 11:38 PM, Brian Fraser <> wrote:
> > > And it's not like prototypes haven't been changed before (to tchrist's
> > > chagrin, e.g.
> > >
> > 
> > Most of the changes are completely backwards compatible
> In fact, most of the changes merely demonstrate how buggy prototype()
> has been in the past.  Many of the prototypes it has returned (even in
> 5.14) do not represent how the function is actually parsed.

I think we're all agreeing, and I'd like to add to it:

I think it's worth remembering that prototypes date from 5.003
The core parser dates from, well, Perl 1. Perl 5 attempted to regularise
the parser.

Prototypes were added (if I understand it correctly) mainly to permit one to
define functions that behaved like core builtins. The core's parser doesn't
use prototypes to parse the builtins.

Prototypes are attempting to converge on the core parser, not the other way.
When prototypes have been changed, I think it's usually without changes to
the core parser - ie it's trying to better approximate what the core parser

Changing the "prototype" of a core builtin for the intent of changing
behaviour doesn't actually mean changing the prototype. That's a derived
property. It actually means changing the parser. Changing the parser is quite
possible. But it's not just "a function in isolation".

So I think it's important to realise what level the change is actually at.

Nicholas Clark

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