[Issue 689] New: Clean up the spec printfs! :)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 14 16:46:52 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=689
Summary: Clean up the spec printfs! :)
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P3
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: jarrett.billingsley at gmail.com
We got another newcomer asking about how to successfully print things with
printf() on the newsgroups again. Being an avid anti-printf crusader, I
decided to see how often printf really appeared in the specs.
I found a veritable _hornet's nest_ of heresy.
In an attempt to spread the True Way of D (writef[ln]), I hope that these vile
creatures will be exiled from our fair kingdom for good.
Here's a list:
code_coverage.html
Twice in the sieve program (and shows up in the coverage example as a
result).
cppstrings.html
Several times in the wc program.
cpptod.html
In the D examples in the "recursive templates" and "meta templates"
sections.
ctod.html
In "formatted printing" it says "printf rules." This is most certainly
not true ;) It should say "printf is not typesafe or threadsafe and doesn't
understand most of D's types. Use writef[ln] instead."
In the "variadic function parameters" example.
declaration.html:
In two examples for typeof().
dll.html:
A printf massacre.
expression.html:
Strangely confined to cases 1, 2, and 3 of is() expressions.
function.html:
Two major examples in the section about D variadic arguments use printf
profusely.
html.html:
The code uses printf.
mixin.html:
OH MY PRINTF. Not a single writef[ln] on the page.
overview.html:
Again, the sieve program uses it.
statement.html:
Lots in foreach and try-catch-finally statement examples.
template.html:
One in the "Tuple Parameters" section.
tuple.html:
The "Putting it all together" example has two of them.
version.html:
One in the "debug specification" section.
phobos/std_intrinsic.html:
Tons.
phobos/std_outbuffer.html:
Well the class itself has printf() and vprintf() methods with no writef
alternatives, which kind of shows this class's age.
In addition, I found a few pages which don't seem to be used anymore, and can
probably just be deleted:
phobos.html, std_format.html, std_openrj.html, std_stream.html
Note that these are all in the html/d directory, not html/d/phobos.
--
More information about the Digitalmars-d-bugs
mailing list