GTK+ header files use the identifier "klass" so they will compile under C++, where "class" is a reserved keyword. I find this a tad interesting, as I personally would have used "_class" rather than a KDE-looking bastardization of the English language.

The Ruby implementation also uses the name "klass" internally for class-type objects. This seems to be becoming a de facto standard for all object-oriented systems implemented in C; personally, I don't care what identifier is used unless the source tree remains internally consistent :)

I would slightly prefer this spelling rather than "_class" because the format "_var" is usually used as a form of abstraction in C, hiding away the details of the implementation of the API. A struct member named "_foo" in C is likely to not be user-serviceable, much like a "private" method/variable in OO languages.

Log in or register to write something here or to contact authors.