D Conference Tango Phobos
Sean Kelly
sean at f4.ca
Fri Sep 14 23:12:49 PDT 2007
Janice Caron wrote:
> On 9/14/07, Bill Baxter <dnewsgroup at billbaxter.com> wrote:
>> Better support for localization for one. Tango's routines let you
>> change the order of arguments in the format string, since the grammars
>> of different languages don't always use the same word order. You can
>> say "{1} is {2}" in Tango, in contrast to "%s is %s" of writefln.
>
> I understand why that functionality is a good thing, but why should
> that mean the libraries are incompatible? Why not just give the
> function a different name, e.g. echo instead of writef, echoln instead
> of writefln?
>
> Not to be nitpicky or anything, but what if I want argument reordering
> /and/ formating? e.g. suppose I want to echo the second argument as
> "%+6.2f"?
The Tango routine provides formatting options as well. It follows the
C# style described here:
http://blog.stevex.net/index.php/string-formatting-in-csharp/
Sean
More information about the Digitalmars-d
mailing list