Re: [boost] BOOST_FOREACH review results

In-Reply-To: <989aceac050505060373e68a1@mail.gmail.com> caleb.epstein@gmail.com (Caleb Epstein) wrote (abridged):
What about the name? Shouldn't it be "BOOST_FOR_EACH"?
Why? Because of the distinct English words?
Yes. And for consistency with other C++ macros, algorithms and keywords. I've argued at greater length in the other thread. -- Dave Harris, Nottingham, UK.

Dave Harris wrote:
In-Reply-To: <989aceac050505060373e68a1@mail.gmail.com> caleb.epstein@gmail.com (Caleb Epstein) wrote (abridged):
What about the name? Shouldn't it be "BOOST_FOR_EACH"?
Why? Because of the distinct English words?
Yes. And for consistency with other C++ macros, algorithms and keywords. I've argued at greater length in the other thread.
FWIW, I agree with Dave on this. We should not pretend it's a keyword. It's not. Also, Peter noted that the proper spelling for the keyword would be "for". So, if we try to follow that, it would have to be spelled: "BOOST_FOR", which IMO is a lot better. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net

Joel de Guzman wrote:
Dave Harris wrote:
In-Reply-To: <989aceac050505060373e68a1@mail.gmail.com> caleb.epstein@gmail.com (Caleb Epstein) wrote (abridged):
What about the name? Shouldn't it be "BOOST_FOR_EACH"?
Why? Because of the distinct English words?
Yes. And for consistency with other C++ macros, algorithms and keywords. I've argued at greater length in the other thread.
FWIW, I agree with Dave on this. We should not pretend it's a keyword. It's not. Also, Peter noted that the proper spelling for the keyword would be "for". So, if we try to follow that, it would have to be spelled: "BOOST_FOR", which IMO is a lot better.
I really don't care what it's called, but how are we to pick amongst BOOST_FOREACH, BOOST_FOR_EACH and BOOST_FOR? Straw poll? Also, I see: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1650.html#85 but I'm not aware of any official proposal to add this to the standard with this or any other syntax. And the motivation for prefering "for" over "foreach" or "for each" is to avoid adding a new keyword, not out of any sense of aesthetics. We are not so constrained. IMO, FOREACH reads better than FOR. -- Eric Niebler Boost Consulting www.boost-consulting.com

Eric Niebler wrote:
Joel de Guzman wrote:
Dave Harris wrote:
In-Reply-To: <989aceac050505060373e68a1@mail.gmail.com> caleb.epstein@gmail.com (Caleb Epstein) wrote (abridged):
What about the name? Shouldn't it be "BOOST_FOR_EACH"?
Why? Because of the distinct English words?
Yes. And for consistency with other C++ macros, algorithms and keywords. I've argued at greater length in the other thread.
FWIW, I agree with Dave on this. We should not pretend it's a keyword. It's not. Also, Peter noted that the proper spelling for the keyword would be "for". So, if we try to follow that, it would have to be spelled: "BOOST_FOR", which IMO is a lot better.
I really don't care what it's called, but how are we to pick amongst BOOST_FOREACH, BOOST_FOR_EACH and BOOST_FOR? Straw poll?
Also, I see: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1650.html#85
but I'm not aware of any official proposal to add this to the standard with this or any other syntax. And the motivation for prefering "for" over "foreach" or "for each" is to avoid adding a new keyword, not out of any sense of aesthetics. We are not so constrained. IMO, FOREACH reads better than FOR.
Well, you are the author, so you call the shots. No need for polls or anything like that. Any name for our bicycle shed will be ok as long as it is pink :-) Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net

"Joel de Guzman" <joel@boost-consulting.com> wrote
FWIW, I agree with Dave on this. We should not pretend it's a keyword. It's not. Also, Peter noted that the proper spelling for the keyword would be "for". So, if we try to follow that, it would have to be spelled: "BOOST_FOR", which IMO is a lot better.
Not that I have a strong opinion on this, but I think "for" is not a good analogy... "For" is something that has "start" statement, end condition, and "next" statement. "For" is something with two semicolons... It has much broader meaning. I think "BOOST_FOREACH" is a perfect name. It's brought from different languages where it's spelled like this, and should stay this way. "FOREACH" is short enough and ideomatic enough to be better without underscore. Regards, Arkadiy
participants (5)
-
Andrei Alexandrescu (See Website For Email)
-
Arkadiy Vertleyb
-
brangdon@cix.compulink.co.uk
-
Eric Niebler
-
Joel de Guzman