Re: Interface Versioning



Hi Dick,
        
On 12 Jul 2001, Dick Porter wrote:
> >         So, to try and get all these things to be compatible, in fact  you
> > create a situation where in most cases the new interface will link fine
> > with old code, [ since all the symbol names will be fine ], but will
> > produce horrendous runtime errors - since the signatures are different.
> > Please version inside the interface name, and not the useless CORBA
> > version.
> 
> Thats not true! If the signature changes then the application code has
> to change too, or it wont link.

        Not true. If [ as you suggest ] we use the 'interface version': 
the IDL compiler does not mangle this into the stub / skel function names.
The last time I checked C compilers do not mangle the type and number of
their arguments into the function name / link time data.[1]

        Consequently you can have:

        GNOME_Foo (CORBA_Object o, const CORBA char *foo, *ev);

and then maybe in version 1.1 you do:

        GNOME_Foo (CORBA_Object o, GNOME_MyStruct *baa, long foo, *ev);
  
        And you will be able to _link_ whichever way you like, with gross
signature mismatches, and commensurate horrible cockups when you run.
 
        If you version in the Interface name [ as you might notice I keep
hammering on about this ] you get:
  
        GNOME_Foo  (CORBA_Object o, const CORBA char *foo, *ev);
and
        GNOME_Foo2 (CORBA_Object o, GNOME_MyStruct *baa, long foo, *ev);
  
        And it will be impossible to get the thing to link incorrectly.
 
        Of course, you can then activate on IDL:GNOME/Foo2:1.0 and this
(again) is what I reccommend for interface versioning.
    
> >         In conclusion - if you feel you really, have to version your
> > interfaces - please do it in the human readable, part of the interface
> > name - and not in the dodgy, unsupported, CORBA 'version'.
> 
> ?!
>   
> Which is more unreadable? "Open/1.0" vs "Open/1.1" or "Open" vs
> "OpenEmbracedAndExtended" ?
  
        Tell me what version of the interface this method call is using,
and thus what arguments it should take:
   
        GNOME_Foo ()

        How about this one ?

        GNOME_Foo2 ()   

	I still believe that aggregating / appending new features is
probably the best way to go, since then you don't change the interface,
and people feel they can atualy trust your interface is not going to
change and write code against it.

	Again the conclusion - please version your interfaces in the human
readable / IDL compiled portion.

	Regards,

		Michael.

[1] - although C++ compilers do.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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