Hi Michael,

On Fri, 2012-06-22 at 11:21 +0200, Michael Stahl wrote:
> there are reasons why some methods look like this, it's because you
> can't have all 3 of:
> 
> 1. statically typed interface
> 2. binary backward compatibility of interface
> 3. ability to extend existing interface with new optional parameters

        I disagree :-) if we allow a hetrodox understanding of type information
for the same interface, and we compile that in rather than having it in
types.rdb (with all it's performance, size & lookup problems)  -and- we
forcibly bridge all in-process extensions that are not native: certainly
we can have all three - it is mostly a matter of clever bridging, and
choosing of good back-compat defaults (that map to zero / whatever we
pad with).

        If we make UNO more powerful in that way, we can improve things quite a
bit here.

> an example for b) is the use of the MediaDescriptor "service", which is
> really just implemented as a sequence<PropertyValue> that is passed to
> various loadFromMedium etc. methods; the thing has about 20 or so
> optional properties, and i cannot imagine an interface with 20 explicit
> parameters, most of which are not mandatory, and many of which are of
> type string anyway, to be better (or easier to use) than the current
> XComponentLoader.loadComponentFromURL.

        Sure - if we could have extensible struct (also possible cf. above) -
then we could avoid sequence<PropertyValue> and use structs in many of
these cases which would be rather nice.

> >     So - syntactic sugar sounds good to me ;-) I'd particularly like a
> > built-in UNO, efficient signal/slot mechanism and native language
> > bindings for each language [ but particularly C++ ].
> 
> can you point me to something existing that is like this "signal/slot"
> thing you want?

        Sure - tools' IMPL_LINK - would be the broken, degenerate, gross
case :-) More attractive versions would be g_signal or Qt's signals&
slots[1], I've used the rather sweet C# bindings of these too to good
effect; boost has a nice implementation as well anyhow checkout:

        http://en.wikipedia.org/wiki/Signals_and_slots

        ATB,

                Michael.

[1] - http://qt-project.org/doc/qt-5.0/signalsandslots.html
-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to