[C++-sig] GNU gettext and "_"
David Abrahams
david.abrahams at rcn.com
Thu Jun 20 19:35:46 CEST 2002
> >>>>> "RWGK" == Ralf W Grosse-Kunstleve <rwgk at yahoo.com> writes:
>
> RWGK> I am having real difficulties seeing the usefulness of the
> RWGK> "mirror Python syntax" approach,
I can't believe I'm reading this. The advantages seem obvious to me:
1. There's less to learn.
2. It's easier to remember
3. It's more convenient.
4. Somebody (Guido) already figured out what a good interface to these
facilities looks like. Names like PyObject_GetAttrString() are a mere
concession to "C". Guido designed it to read: "getattr()"
> RWGK> especially if you threaten
> RWGK> to mess around with defines in questionable ways.
You're kidding, right? It's the person who sticks "#define _(x) gettext(x)"
in a header file that's doing questionable things with defines! I'm willing
to make a small concession to those people by avoiding that identifier if
they've #defined it, and that's all.
> RWGK> Why would I want to write Python in C++?
Because it's the best interface for manipulating Python objects.
>If I want convenience I use Python, and if I need speed I use
(pure/real/familiar) C++.
Occasionally you want to write functions in C++ that have to interface with
Python objects. Boost.Python is not intended to restrict people to doing
that sort of interaction on the Python side.
-Dave
More information about the Cplusplus-sig
mailing list