4 ms·
GNOME software is written conventionally so you can't just "put things in C++ mode and it's fine" - lots of churn would be needed to make it C++-clean (e.g. the
by awalton 11y ago
GNOME software is written conventionally so you can't just "put things in C++ mode and it's fine" - lots of churn would be needed to make it C++-clean (e.g. the 'class' and 'new' keyword are used as variable names, etc).
Gtk+ on MSVC is supported, sadly. It'd be really nice if it weren't, because then glib could be C99 and we'd all be really happy about it - the glib developers aren't stooges refusing to go forward, they're stuck between a rock and a hard place by Microsoft's amazing reluctance to build anything resembling a sane compiler and over a decade of binary stability.
Yeah, Gtk+ could've thrown the "fuck you" to the Microsoft compiler when they broke for 3.x, and in a lot of ways, I wish they would have, but making those decisions usually means porting software, and so nobody's willing to do it in a 3.x branch. Maybe when the fabled Gtk+ 4.x rolls around.
- bjourne 11y agoBut we aren't talking about all GNOME software, we're only talking about GTK+ and perhaps supporting libraries like glib, gobject, pango etc. It's not hard to write gobject-based C code which compiles in msvc's c++ mode. I know because I have done it myself. On a cursory grep through the gtk+ codebase, I can't find a single use of "new" as a variable name and only a scant few instances of "class". The gtk+ coding guidelines already recommends you to write "klass" instead of "class" probably for this reason. Replacing the remaining bad names isn't an onerous task. It's a days work for one person at most.