Introspect data from Python missing return parameters
John (J5) Palmieri
johnp at redhat.com
Fri Oct 7 09:38:44 PDT 2005
On Fri, 2005-10-07 at 12:12 +0200, Tako Schotanus wrote:
> The job of the caller? Then why have types at all, why not have every
> method just take a v parameter and be done with it? ;-)
Types are already sanitized by D-Bus. The points of the types are to
fit in with typed languages. Obviously they need them. The purpose of
the bindings as I see them are to take D-Bus and fit them into the
language being bound and to hide D-Bus as much as possible. We can't
have completely transparent bindings so in areas they show through
however I am loath to force typing on an untyped language. If Python
ever gets typing I will use that information but I feel it works fine
the way it is.
As an aside we don't rely on introspection data. It is there for
hinting only in the Python bindings.
> I agree that because DBus is bound to be used with a lot of weakly typed
> languages assuming v would be logical but on the other hand that would
> maybe make it necessary to have have an explicit way of saying that a
> method has no return value. Or should we just live with every method at
> least returning v, even in strongly typed languages?
I have thought of this. Actually in Python even if there is no argument
to return we return an empty message so there is always a reply. I will
add a switch to calls for ignoring replies as an optimization.
> I also think it would be worthwhile to stimulate people to make their
> introspection data as complete and correct as possible otherwise lazy
> programmers will just leave it out and we would lose a host of
> interesting possibilities with respect to auto-generated apis, discovery
> tools and who knows what. (Personally I'd make introspection data
> mandatory ;-)
These are the same arguments typed and weakly typed proponents had had
for ages. My first goal is to make D-Bus a good fit for Python not
Python a good fit for D-Bus.
--
John (J5) Palmieri <johnp at redhat.com>
More information about the dbus
mailing list