Re: Recommended way to handle deprecation?
Andreas Rottmann <[email protected]>
| Newsgroups | gmane.comp.gnome.language-bindings |
|---|---|
| Message-ID | <[email protected]> |
James Henstridge <[email protected]> writes: > On 31/03/04 22:50, Andreas Rottmann wrote: > >>Hi! >> >>I wonder what the recommended way to handle deprecated API: to wrap or >>not to wrap, that's the question here :). How do other bindings handle >>this and is there a "recommended way"? >> > If you remove deprecated interfaces from your binding, then you will > break programs written against old versions of your binding. So while > I can write a C program today and know that it will work with all > future GTK 2.x releases, if I write it against a language binding that > doesn't wrap deprecated interfaces, it might break when the next 2.x > release comes out. > > The best option would be to wrap the function, and emit a deprecation > warning if possible (I know Python and Java can do this, and GCC has > an extension to do this for C/C++). > Guile does this for its own API, so it should be possible to here too. Thanks for the advice; So I think the rules can be formulated like this: 1) If you start a new binding of some lib, don't wrap deprectated stuff. 2) If you underlying stuff becomes deprecated, provide it, along with a deprecation message, if possible. Maybe this should be noted in the Binding Rules somewhere. Andy -- Andreas Rottmann | Rotty@ICQ | 118634484@ICQ | [email protected] http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62 A. Because it breaks the logical sequence of discussion Q. Why is top posting bad? _______________________________________________ language-bindings mailing list [email protected] http://mail.gnome.org/mailman/listinfo/language-bindings