|
Boost : |
From: Samuel Krempp (krempp_at_[hidden])
Date: 2002-01-21 04:56:57
On Sun, 2002-01-20 at 23:13, Beman Dawes wrote:
> I have the sense that Ed's operator[] suggestion would solve some technical
> problems, but it just plain looks too ugly to me.
oh, technically it's much the same as operator%..
The difference is rather how to pass manipulators.
nobody likes the 'glue()' function. I can rename it 'manip()', but it
still isn't as nice as having a specific operator, like () for manips
and [] for arguments.
Here's a list of possibilities :
a)
format("%3, %1 %2-th try") % 40.23 %manip(hex) % 50 % "toto"];
b) operator* for manips, and % for arguments :
format("%3, %1 %2-th try") % 40.23 * hex % 50 % "toto"];
c)
format("%3, %1 %2-th try") [40.23] (hex) [50] ["toto"];
This is very superficial, but at the same time crucial for the library..
For now I reverted the library to previous state, a)
which is using operator%, and a function (manip, previously named
'glue')
If there were no manipulator stuff, a) would be my favorite.
but c) is the only approach that still looks good with manipulators.
but apparently everybody favors a).
Well, maybe I should not care too much about passing manipulators, as
this should not be used very frequently anyway..
-- Sam
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk