Re: [gtk-list] Macros vs functions



> As another writer of a GTK+ high-level language binding, I agree
> completely.  When I read the GTK+ docs, they stated that part of the
> intent was to make it easy to write high-level bindings.  Macros are
> the antithesis of language bindings, and have caused me no end of pain
> with other graphical toolkits.  My vote is to replace ALL macros with
> equivalent functions, or at least supply equivalent functions for all
> macros, so that the choice is available to the programmer.  This
> implies a macro naming convention that makes it obvious whether the
> construct is a macro or a function call.

As yet another writer of a GTK+ high-level language binding (GtkAda,
http://ada.eu.org/gtkada/), I agree that having the corresponding "callable"
functions would be great.

Usually (see for example the Xlib) what is done is both a macro for efficiency
purposes, and a corresponding function, so my vote for having both.

Arno



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]