GNOME Bugzilla – Bug 617197
Macro for defining object and class
Last modified: 2014-12-22 18:05:09 UTC
Created attachment 159909 [details] Macros for defining an object and a class There should be a macro for defining an object and one for defining a class. This would show best practices, hide how this is done and be shorter than what is currently done.
Related to bug 341378.
I don't want to take any position yet whether this idea as such is useful or not, but I strongly object (pun intended) to the naming / terminology. Surely you aren't "defining" an "object" here? You define an object *type*, yes. But "objects" are *instances* of a type.
I don't think this buys you much, really. First of all, it doesn't _show_ the best practice, but hides it behind a macro. And then, it doesn't actually get you out of having to type out most of the boilerplate, since you can't define macros in macros.
bug 389585 has an initial implementation that solves the "cannot define macros in macros" issue. *** This bug has been marked as a duplicate of bug 389585 ***