Why is the identifier "printf" known by the frontend?
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Thu Oct 26 17:14:20 PDT 2006
BCS wrote:
> Walter Bright wrote:
>> Wolfgang Draxinger wrote:
>>> What is the reason for that? "import std.stdio" is not a real
>>> difficult thing to type.
>>
>> Because I find it verrryy handy in writing minimal test cases.
>> writefln, in order to work, requires much of D and Phobos to be
>> working properly. printf, being part of the C library, doesn't require
>> any of Phobos and very little of D to work, so it's handy when things
>> are broken.
>
> Could this be put under a compiler switch?
>
> -dbg compiler debug mode
Or just -debug=PhobosDebug (or whatever).
No compiler modifications necessary.
Of course, this should be turned off for the Phobos binary distributed
with the compiler.
More information about the Digitalmars-d
mailing list