Re: gvfs status report



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".

regards,
Mathieu




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]