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

[perl #125471] sprintf behavior or documentation bug

From:
James E Keenan via RT
Date:
January 23, 2016 03:29
Subject:
[perl #125471] sprintf behavior or documentation bug
Message ID:
rt-4.0.18-1519-1453519742-915.125471-15-0@perl.org
On Wed Dec 09 15:39:04 2015, jkeenan wrote:
> On Thu Jun 25 06:08:14 2015, saint.snit@gmail.com wrote:
> > > perl's sprintf() formatting mostly follows the C standard where
> > > applicable, which states:
> > >
> > > If the space and + flags both appear, the space flag is ignored.
> > 
> > This is a *much* clearer way to explain it than documenting the
> > combined behavior anew.
> > 
> > Even if the second explanation is fixed to say "nonnegative" rather
> > than "positive," repeating the explanation at all only leaves the
> > reader scrutinizing the two behavior descriptions to see what, if
> > anything, is different.  On the other hand, if you just say that
> > adding a space has no effect on the +, the user will know immediately
> > what to expect--and there's no chance of getting details wrong in the
> > repeated explanation, because there isn't one.
> > 
> > The benefits of modularization are just as applicable to documentation
> > as to code. :-)
> 
> TonyC:  Do you think we should go forward with this documentation change?
> 
> Thank you very much.

TonyC: ping ^^
-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=125471



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