From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2002-10-07 14:37:06
----- Original Message -----
From: "Dirk Gerrits" <dirk_at_[hidden]>
> set_cont: adding 1,2,3,4 to set_cont(v) doesn't seem natural to me.
> set_cont(v, (1,2,3,4)) or something similar seems much more natural. Or
> even: cont(v) = 1,2,3,4; Am I really the only one who thinks so?
no. I donøt think 'set_cont' is perfect either. First, there is something
irritating about the 'cont' abbreviation. 'set_container' sounds
better, although it's too long; then I think plain naked 'set' is better.
And by transitivity 'set' should be better, right?
we have to be careful when saying like you do "set_cont: adding 1,2,3,4 to
set_cont(v) doesn't seem natural to me. ". It's not just 'set_cont'
In fact, we should look at the entire prototype:
set_cont( Container& )
In some sence this contains redundant information compared to
set( Container& )
Now, when we talk about what is "natural", we should _always_ see how it
looks when its typed, that is, how the intention of the final code looks
like. Compare then
#1: as of now
set_cont( v ) = 1,2,3,4;
#2: perhaps new
set( v ) = 1,2,3,4;
set_cont(v, (1,2,3,4)); // BTW, how is this possible?
The '=' operator really adds to the readability of the program since its
used for assignment.
> Boost.Python: never used it
> Boost.Lambda: never used it either
> Spirit: the operator overloading of Spirit follows naturally from the
> Extended Backus Normal Form. (Or was the N Naur?) EBNF in any case. ;)
> I hope I have rectified my rather rash statement somewhat.
> Kind regards,
> Dirk Gerrits
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk