Re: Plans for gnome-vfs replacement
- From: Alexander Larsson <alexl redhat com>
- To: "Gustavo J. A. M. Carneiro" <gjc inescporto pt>
- Cc: "gnome-vfs-list gnome org" <gnome-vfs-list gnome org>, Paolo Borelli <pborelli katamail com>, "gtk-devel-list gnome org" <gtk-devel-list gnome org>, Paolo Maggi <paolo gnome org>, Mathieu Lacage <Mathieu Lacage sophia inria fr>
- Subject: Re: Plans for gnome-vfs replacement
- Date: Wed, 20 Sep 2006 14:38:11 +0200
On Wed, 2006-09-20 at 13:31 +0100, Gustavo J. A. M. Carneiro wrote:
> On Qua, 2006-09-20 at 13:52 +0200, Alexander Larsson wrote:
> > On Wed, 2006-09-20 at 12:55 +0200, Mathieu Lacage wrote:
> > > On Wed, 2006-09-20 at 12:31 +0200, Alexander Larsson wrote:
> > >
> > > > Here is my current GInputStream:
> > >
> > > very nice. Comments below.
> > >
> > > >
> > > > struct _GInputStreamClass
> > > > {
> > > > GObjectClass parent_class;
> > > >
> > > > /* Sync ops: */
> > > >
> > >
> > > Do you dislike the idea of moving the GError as a member of the
> > > GInputStream instance ?
> >
> > Its very uncommon, I'm not sure people will expect that. It will also
> > break things from language mappings that handle GErrors in a special way
> > (say, as an exception).
>
> Even from C, it "hides" the error, making programmers less likely to
> correctly realize they need to handle errors. Moreover, having a shared
> GError per object makes it impossible to ever make the API thread-safe.
The GError itself is only needed for "additional" information about what
went wrong. All the calls also have a way to easy check if the operation
worked or not, like a gboolean return or return -1 on error.
However, despite such technicallities I agree with you.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a genetically engineered vegetarian jungle king searching for his wife's
true killer. She's a foxy mutant barmaid prone to fits of savage, blood-crazed
rage. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]