[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

JavaHL and interfaces, backward compat question

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Fri, 26 Mar 2010 18:27:23 -0500

Mark,
A couple of months ago, you mentioned the avenue of interface-izing the various objects that are part of the public API, such as the callbacks and the client interface. In thinking a bit more about this, and given my general lack of Java background (in spite of the recent commits to the contrary) I've got a question about backward compat in this scenario.

In creating an interface (which we have) for our client API, we could also create interfaces for the objects that interface references. The primary reason for doing so is enabling third-party implentors to do so without having to actually use any of our objects, giving them (and us, ultimately) more flexibility for compatibility.

This does add an additional question: if third-parties are implementing these interfaces, and we chose to add more functionality them (and hence more APIs) to the interfaces, does this break backward compat? Code that formerly compiled against an interface which now includes another function definition would no longer compile, yes? If so, does that consistute a broken backward compat? What if somebody just dropped in the new jar, and didn't recompile?

If adding interfaces to the JavaHL API means that we'll need to rev them (not just extend them) in the event we add more data to those interfaces/objects, I don't know that it's worth the work.

Thoughts?

-Hyrum
Received on 2010-03-27 16:33:39 CET

This is an archived mail posted to the Subversion Dev mailing list.