[C++-sig] Boost.Python v2: beginning of generalized object support

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Fri Jul 19 20:55:49 CEST 2002


--- David Abrahams <david.abrahams at rcn.com> wrote:
> Now that I'm revisiting this issue for my June monthly report, I'm not sure
> that using the name for an inline member function "_" with one argument
> would actually cause any problems in real code. AFAICT, the result would be
> that the member function would be silently renamed "gettext" in the common
> case... and all uses of the function will also be silently renamed to call
> x.gettext(...). Yes, technically this gives an ODR violation if the file is
> included with and without the macro defined, but I know of no real
> compilers which will care about that.

I am sure David will butcher me again for this, but I don't understand why it
is important to save a few characters at the expense of understandability. My
reaction to

x._("foo") = 1
y = x._("foo")

would be "What's that?", while

x.attr("foo") = 1

would make much more sense to my mind if it were untainted.

But hey, David, if you could make it

x.foo = 1

(in C++!) I'd be on your side.

Ralf


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com





More information about the Cplusplus-sig mailing list