Boost logo

Boost :

From: Samuel Krempp (krempp_at_[hidden])
Date: 2002-05-15 03:10:03


Le lun 13/05/2002 à 23:29, Giovanni Bajo a écrit :
> > No offence to the python language, but arg seems a lot clearer to me
> > than %. Never the less, it is of course also possible to implement
> > both. (Right?)
>
> Yes, it is possible.
>
> I'm contacting Samuel to discuss about his library.

of course, it is possible, and it takes just a few more lines.

But it's best to chose between the two syntaxes, taking as a rule that a
library should not provide many parallel ways of doing one thing if they
all have the same features.

(% does allow to use formatting options at parameter-time, e.g. :
format(" %d ") % group(hex, showbase, 26); )

When given the choice between format(s).arg(x1).arg(x2) and
format(s) % x1 % x2 , the consensus went for '%'.

so I sticked to '%'.

-- 
Sam

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