Skip to main content

When is an object using, vs. based-on an object?

7 replies [Last post]
cajo
Offline
Joined: 2003-09-28

A little background: I lead a project here at java.net producing a general purpose library for dynamic distributed computing. Its license is the LGPL, as our community wishes to allow its use in both non-free, as well as free software. Of highest importance is to ensure that it cannot be [i]'embraced and extended'

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mpocock
Offline
Joined: 2006-02-13

I tend to punt these issues by claiming that a jar is the binary linkage unit, and making this explicit in documentation. So, if you dick about with the jar, that is a derivative work. If you include the jar, then you are linking to the work.

As far as sources are concerned, then if you modify my source it is a derivative work. If you write your own code that compiles against mine then it is a linking work. If you write your own code and package it in a single jar with my code then it is a derivative work.

IANAL, but these rules are simple and easy to follow.

biehl
Offline
Joined: 2003-06-19
cajo
Offline
Joined: 2003-09-28

Thanks for the excellent link!

It seems the FSF takes a similar position:

By importing a package, a work is using and [u]not[/u] based-on the library. This applies even when the application extends classes, or implements interfaces contained in that package.

Hopefully this clarfication will be codified in version 3.

It's a very clear line however, in a very gray region.

cowwoc
Offline
Joined: 2003-08-24

My interpretation of their letter is exactly the opposite: that they say that importing a package causes your code to become a derivation of that code.

I happen to strongly disagree with them.

cajo
Offline
Joined: 2003-09-28

I sincerely believe that was my mistake; Sorry!

I am convinced there there is nothing quite so humbling as looking back over one's own posts...

You are right, [i]any[/i] object which extends another, or implements another's interface, definitely [u][i]is[/i][/u] "derivative"; no differently than through reflection, or via RMI.

I think the important point the FSF makes is:

Any "derivative" object is [i]using[/i], [u]but[/u] is not [i]based-on[/i], any object (or interface); as long as it exists in a [u][i]separate[/i][/u] package.

John

umdenken
Offline
Joined: 2004-11-16

These terms - "using" and "based-on" - are they your own? I didn't see them in the FSF/Java document. That could explain some of your problems; Try aligning your questions in terms of the FSF terminology, and your questions may be easier to answer.

cajo
Offline
Joined: 2003-09-28

The terms "using" and "based-on" [i]are[/i] exact FSF terminology.

They are used in a strong admonition, in the second to last sentence of the preamble to the LGPL.

http://www.gnu.org/licenses/lgpl.html