|
Boost : |
From: Richard Day (richardvday_at_[hidden])
Date: 2007-06-19 00:28:27
Mathias Gaunard wrote:
> Ion Gaztañaga wrote:
>
>
>> -> Hard formatting: printf/scanf are much easier to use and they don't
>> need several hundred of function calls to do their job. The operator<<
>> overloading is also a problem if each call needs some internal locking.
>> A formatting syntax that can minimize the locking needs would be a good
>> choice. I would be really happy with a type-safe printf (variadic
>> templates to the rescue).
>>
>
> Something that would use meta-programming to optimize the generation of
> the formatted string would be way better than printf.
How does this improve on printf ? Not that I favor printf but I dont see
how this is any better.
Speed wise yea much better at run time at least, printf is a hog on cpu
cycles.
Do you plan on generating every possible string at compile time ?
I call that code bloat.
I dont think there is an acceptable solution to make everyone happy.
Printf is easier to use for i8n but I like iostreams interface better.
You can always write manipulators to do what you need for formatting
with iostreams if needed.
Best Regards,
Richard V. Day
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk