
Greer, Joe wrote:
Performing the data formatting in the string class means the I/O library wouldn't have to care about Unicode issues.
though I prefer the specifiers from C# to the specifiers actually used by boost format. C# also allows custom formatters to be created and used and I like that idea. I like the idea, too, but I studied the C# a bit and don't like the way
I'm afraid that's not true. The I/O library has to care about Unicode (and general character encoding) if it wants to handle text without placing the entire burden of making the text suitable for I/O (i.e. writing it to a file) on the programmer. On the other hand, the I/O library doesn't need to care about any Unicode issues beyond simple encoding/decoding for simple text transport. Formatting doesn't have to care too much, either (for example, collating is not interesting to generic formatting), and anyway, it'll be very separate anyway. I have written at length in another post on why I think formatting should be based on the I/O interfaces. they're doing it. I cannot make head nor tails from the three involved interfaces (ITextFormatter, IFormattable, IFormatProvider), but it doesn't sound that flexible to me. However, it gave me some ideas. I hope to be able to present them to the community soon. Sebastian Redl