Skip to main content


Embloggeration happened: in which I expand on the topic of writing API that can be used by multiple languages in the land of #gnome hopefully to the benefit of people writing libraries and language bindings

bassi.io/articles/2023/02/20/b…

Federico Mena Quintero reshared this.

Unknown parent

Emmanuele Bassi
@andyholmes there’s a map model in GTK; a bunch of stuff should be moved in GIO, but GTK still moves faster than GLib, which means we can fix API warts faster—like the fact that list models take an unsigned int instead of a size_t for the index
in reply to Emmanuele Bassi

hm, I guess I should have non-variadic versions of adw_message_dialog_add_responses()... I didn't bother initially since it's a helper.
in reply to Alexander Mikhaylenko

@alexm It's entirely up to you if you want to add a vector version and annotate it with `(rename-to add_responses)`, or if you want to leave re-implementing `add_responses()` to language bindings
in reply to Emmanuele Bassi

I mean I can add it, it just seemed like bindings wouldn't need it in the first place, just as nobody is using g_object_set() etc there.
in reply to Alexander Mikhaylenko

@alexm Most people will likely use multiple add_response(), but I'd expect languages like Python or GJS to add overrides to provide the equivalent "iterate over a list of tuples and call add_response()" convenience method just to minimise the differences with the C API