Why the insistence on C for examples in GTK's bug tracker?

The template for GTK bugs includes the text:

Alternatively, please attach a small and self-contained example
written in C that exhibits the issue.

Why must it be C? Wouldn’t it be easier for everybody if python or gjs were also accepted?

Because:

  • GTK is written in C
  • it’s much more likely that GTK maintainers have access to a C toolchain than one in any other language
  • GTK maintainers have to be able to read, write, and understand C; there’s no requirement to read, write, and understand other languages
  • other languages may have different ideas of lifetimes and ownership
  • language bindings have their own bugs that are not the remit of the GTK maintainers
  • running a non-C example under a C debugging tool is typically not going to end well

If you only know Python or JavaScript, you can attach a reproducer; it might take a while to debug the issue, though.

The really important requirements are:

  • small
  • self-contained

In other words: don’t ask me to download your application, or clone a repository, to debug a problem you have—because if you do so it means you value your time more than the time of the GTK maintainers, and while that’s a perfectly valid stance to have, it immediately conflicts with the fact that you’re asking for the GTK maintainers (who are, by and large, volunteers) to spend their time on an issue.

2 Likes

If it is in C, I can dump it into my GTK tree and have it built in 3 minutes.

If it is python, or rust, or js, I have to determine if the bug is in gtk itself, in gobject-introspection,
or the bindings themselves, and I have to figure out how to get bindings to pick up my local GTK,
so I can test a fix.

Not to mention that I am not as fluent in all the languages for which bindings exist.

2 Likes