On Fri, Feb 17, 2012 at 6:19 PM, Christophe Fergeau <cfergeau(a)redhat.com> wrote:
On Fri, Feb 17, 2012 at 05:56:19PM +0200, Zeeshan Ali (Khattak)
wrote:
> On Fri, Feb 17, 2012 at 5:38 PM, Christophe Fergeau <cfergeau(a)redhat.com>
wrote:
> > This naming convention for getters is probably only useful for vala, I
> > think bindings for dynamic languages will introspect object properties at
> > runtime and use g_object_get().
>
> Well, vala will also do the same but setting properties through that
> is known to be considerably slower than using the getter/setter
> directly (because of the type checks etc invovled in case of
> g_object_get).
Yes, and I'm not saying we should go this way.
>
> >So the decision to make is between making
> > the API nicer to read for C users VS making life slightly easier for some
> > bindings.
>
> That is not the decision at all for me since I don't see anyone other
> than you complaining about the various gtk+ APIs following this
> convention. If you can cite examples of C developers complaining about
> it, that would be convincing argument to me.
This is such a small annoyance that noone will complain only about it,
Small? And yet we keep discussing this all over again and again in
detail? Also you can't know this for certain, maybe most people don't
find it annoying at all?
> > Would a Rename to: annotation help vala here? Or is there
some annotation I
> > don't know of to mark property getters/setters?
>
> Maybe? But I don't think we are that desperate yet. :)
Why? You are the one insisting that the vala bindings are as efficient as
possible, it would be nice to know exactly what options we have.
By following a usual convention that we are already following and
something we have already discussed and we already went with my
proposal. If you would be making me go through this each time we add a
boolean getter, please go ahead and change the API that way you think
is pretty. I won't object at all, as long as you change all the other
getters too in both libosinfo and libvirt-glib.
Alternatively we can both compromise and agree on 'get_is_saved'.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124