[Gtk-sharp-list] Using IList for API beauty

Lee Mallabone gnome@fonicmonkey.net
22 Apr 2003 14:36:39 +0100


Hi all,

While documenting various classes in Gtk#, I come across some API bits
that I'm not too keen on.
One thing I've seen a few times is things like this constructor from
Gtk.RadioButton:

public RadioButton (GLib.SList group);

Now this is completely accurate from a Gtk+ point of view. However, from
a Gtk# point of view, I think this would be *much* more elegant if its
public API was actually:

public RadioButton (IList group);

Am I dreaming? Is this feasible? I'm not entirely certain if it can be
done efficiently, or if a class that implements IList would still have
to be wrapped into a GLib list before passing it down to the C
library...

I would expect any .NET programmer to know exactly what an IList is
after very little training, but I'd also expect that most would have to
go hunting for docs to find out exactly what a GLib.SList does, (and as
it happens, they wouldn't find any yet).

Am I alone in thinking IList usage would be nicer? If not, could someone
point me in the right direction to implement this?

Regards,

Lee.