Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-07-01 09:36:55


From: "David Abrahams" <david.abrahams_at_[hidden]>

> While we're exploring that path, we could get even more Pythonic:
>
>
> format(" $1 $2 $3") % tuple(x, y z))
>
> or, heck, fully pythonic:
>
> " $1 $2 $3" % tuple(x, y z)
>
> or, less Pythonically:
>
> format(" $1 $2 $3", tuple(x, y, z));
>
[...]
> From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
>
> > Samuel Krempp wrote:
> > > cout << format(" $1 $2 $3", x, y, z) << endl;
> > > cout << format(" $1 $2 $3") %x %y %z << endl;
> >
> > Or may be this?
> >
> > cout << format(" $1 $2 $3")(x)(y)(z) << endl;

Every syntax is possible, but I want to point out that we should stay within
the confines of C++. Python may be a great language and I have nothing
against it, but many C++ programers have never heard of it and will not feel
at home with the syntax.

format(" $1 $2 $3", x, y, z) is the C++ way to do things.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk