On Thu, 2007-02-15 at 20:17 +0100, mathieu lacage wrote:
> On Thu, 2007-02-15 at 17:32 +0100, Alexander Larsson wrote:
>
> > > You probably thought about it already, but why not
> > > GSocket{Input|Output)Stream?
> > >
> > > In general I think naming works good if the interface is named with the
> > > abstract concept, and the implementation is named:
> > > <Imp><Concept>
> > >
> > > For example:
> > > interface: GInputStream:
> > > implementations : GFileInputStream, GSocketInputStream,
> > > GByteArrayInputStream, etc.
> >
> > GFileInputStream is actually an abstract subclass that adds interfaces,
> > not an implementation. But your point stands.
> >
> > > Consistency help.
> > >
> > > That being said, I think a more "practical" naming would be:
> > >
> > > <Concept><Imp>
> > >
> > > e.g.
> > > GInputStreamFile, GInputStreamSocket, etc.
> > >
> > > that would allow easier completion in IDEs such as Eclipse.
> > >
> > > But at the end of the day I would go with Java/.NET naming,
> > > I don't think it's worth going against the grain of what people expect.
> >
> > Yes. I've thought about this a bit. Or at least noticed it. I'm not sure
> > what approach is best here.
> >
> > We already have classes like:
> > GtkCellRenderer(Text,Toggle,Pixbuf), GtkFileSystem(Unix,Win32)
> > But we also have things like:
> > Gtk(H,V)Scrollbar, Gtk(Check,Image,Radio)MenuItem
> >
> > So, we're not exactly consistent on this atm. I don't know what the best
> > solution is, but we should decide on something and then stick to it for
> > all new Gtk+ APIs.
>
> I think that the past naming pattern (and the one which should be used
> all the time) is what the english grammar requires (I am not fond of
> english but this is really a convention about naming stuff using the
> english language). i.e., GInputSocketStream should probably be renamed
> to GSocketInputStream because this is a "Socket Input Stream".
I guess this makes some sense. The disadvantages is that its not as
obvious which implementations of an interface there are (its not as easy
as GInputStream*), but its clearly much easier to read.
I'm fine with changing this. What do other people think?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
[EMAIL PROTECTED] [EMAIL PROTECTED]
He's an all-American flyboy matador possessed of the uncanny powers of an
insect. She's a cold-hearted punk archaeologist with someone else's memories.
They fight crime!
_______________________________________________
gnome-vfs-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list