www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: D Conference Tango Phobos

renoX 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.

Somehow I don't see that requiring me to count where my arguments are as a progress for me.

That is not the point. To me, french makes a lot more sense if I read the sentences from back to front, because that way the grammar becomes closer to German and I only need to figure out the meaning of the words (This probably tells you a lot about my knowledge of French :-) By the same reasoning, it sounds in some languages more elegant to say "Apples are there 3", instead of "There are 3 apples". Now you can program somehting like print("There are {1} {2}", number, fruits); Actually, you say something like print(wxT("There are {1} {2}"), number, fruits); Now, the translator comes into play to translate your program into something like Swahili. He knows nothing about pogramming, but that "There are {1} {2}" is in Swahili "Hakuna {2} matata {1}" (This tells you something about my Swahili knowledge :-) wxT() is actually the localizing function, a table lookup where "There are {1} {2}" goes in and "Hakuna {2} matata {1}" comes back. Ciao Tom
Sep 16 2007