tl;dr: No feature is super cool in GLib if it’s not widely useful. In my experience so far, the thing about fancy data structures is that typically they’re needed in specific situations where performance or certain behaviour is needed, and in those situations a generic implementation of the data structure often doesn’t do exactly what you need. So you end up implementing your own version of the data structure anyway.
I think that the genericness teached by GLib → to pass around gpointers as the stored data (giving up static typing of C) → would be sufficient so that what you’ve described wouldn’t have to happen.
That’s why GLib doesn’t have many fancy data structures, but lots of the boring and simple ones (for which a generic version is often widely applicable).
I think that there are some fancy data structures in GLib – eg.: GSequence/…Iter. IT’s backend data structure is sophisticated and the property of “always valid iterators, even after moving the element, event to another GSequence” is quite remarkable. I have a hook into such subject – to provide a sophisticated-backend data structure yet simple to use and with uncommon, treasure properties – and I would be glad if I could add another such thing to GLib. This is my pet subject currently. I hope that I’ll succeed with doing this.
Mostly, if someone has gone to the trouble of working out that three projects share an implementation of something which should be upstreamed to GLib, the upstreaming has already been done, because at that point there’s a good incentive to go ahead and finish it.
I don’t fully understand what you’ve wrote here. What do you mean by “the upstreaming has alredy been done”?
Generally, though, the most useful contributions come when people are scratching their own itch and fixing or implementing something which they need for their project — then they know exactly what the use cases and correct API are.
I hope that I’ll be able to come up with an use case in my MC fork (which is based on GLib like the original proj) ↔ ie. to come up with a feature for my own project, being inspired by such issue (I’m adding tons of features to the fork, quite often coming up with them such way).
I’ll take a look at the issues.