[Gtk-sharp-list] Interface Name Patch
Todd Berman
tberman@sevenl.net
Wed, 26 May 2004 21:30:48 -0400
On Wed, 2004-26-05 at 17:54 -0700, Samuel Kaufman wrote:
> On Wed, 2004-05-26 at 15:30, Todd Berman wrote:
> > Breaking this much code for no appreciable gain to me seems to make
> > little to no sense. I don't think a user type should ever implement a
> > GInterface directly, as it just wont work the way you want it to (yet,
> > maybe later). Therefore giving it the preceding I gives you no API
> > clarity, and just breaks almost every single Gtk# app in existence. For
> > what point?
>
> No API clarity? It's one of the best things you can do with C# to
> improve API clarity. When declaring what classes/interfaces a new class
> inherits from, it can become an annoying job to figure out if one is
> inheriting from an interface or class. Of course, if a user would never
> need to implement one, then why are they public?
So that you can use a common interface between TreeStore and ListStore
without worry about which one it is. (and other c or potentially with
vlad's patch c# Stores)
>
> > If Gtk# is rough around the edges only because we dont have an I in
> > front of interfaces that you should *never* implement directly then I
> > would say our job here is done, and we can pack up and go home early.
>
> Well, not 'only' because of it, but that's the issue I decided to argue
> about today. Actually, it looks like most of my gripes have been fixed
> already, so erm... never mind.
>
> >
> > Basically, you should treat these interfaces as abstract classes, not
> > interfaces.
> >
> > And believe it or not, existing gtk+ developers moving to gtk# are one
> > of the prime targets of gtk#.
> >
> > --Todd
>
> The inconsistency is the annoying bit. Why does ITreeNode have the
> preceding I, for instance?
>
Because ITreeNode is designed to be implemented by the user (read:
average developer who is using the NodeStore (which is nobody most
likely, because it hasnt been finished)).
--Todd