Notes from C++ static analysis

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jun 26 19:18:27 PDT 2013


On 6/26/13 1:50 PM, bearophile wrote:
> Andrei Alexandrescu:
>
>> Actually this is good because it allows to customize the format string
>> to print only a subset of available information (I've actually used
>> this).
>
> Your use case is a special case that breaks a general rule.

There's no special case here.

> That
> behavour is surprising, and it risks hiding some information silently.

Doesn't surprise me one bit.

> I
> think format() is more correct here.

I think it has a bug that diminishes its usefulness.

> If you want a special behavour you
> should use a special function as partialWritefln that ignores arguments
> not present in the format string.

That behavior is not special.


Andrei


More information about the Digitalmars-d mailing list