Re: [Vala] type MIN and MAX



On Mon, 2008-09-15 at 08:32 -0400, Levi Bard wrote:
What about this?

http://blog.stevex.net/index.php/string-formatting-in-csharp/

Just taking {0} {1}...
What would the c#-style format give us that the printf-style doesn't?
If you're just going to use an item's to_string() method, you can
invoke it explicitly and use %s.
The c#-style formatting has the additional pitfall of letting you
inadvertently do:  string.Format("{0} blah {1}", foo);
I see a fair number of those, and they don't get caught until runtime.
But there would be a great advantage: sometimes when translating strings
you need to change the order of arguments, with this format it's dead
easy.

        Xav





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]