Boost logo

Boost Users :

Subject: Re: [Boost-users] [format] Alternative syntax
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-07-29 20:16:19


On Wed, Jul 29, 2009 at 1:33 PM, Steven Watanabe<watanabesj_at_[hidden]> wrote:
> AMDG
>
> Emre Turkay wrote:
>>
>> Any interest in the alternative syntax for boost::format?
>>
>> format2 f("Hello %s, %s");
>> std::cout << f("Joe", "Jane") << std::endl
>>          << f("Jose", "Mary") << std::endl;
>>
>> Which creates the output;
>>
>> Hello Joe, Jane
>> Hello Jose, Mary
>>
>> Code is available at http://bit.ly/2J60Re for any suggessions.
>>
>
> Why is this syntax better?

I like that syntax, and I can see how it could be better in that it
would have better caching (does not need to recreate the object, which
is very slow), and it is a more simple syntax then the normal way you
can cache it. Looks nice to me.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net