GPL - freedom versus restriction

Mark van Gulik ghoul6 at home.com
Fri Nov 9 04:19:48 UTC 2001


Here's another analogy, this one designed to highlight the 
counterintuitive notion of freedom:

In a strongly-typed language with blocks, the block types should 
be covariant by return type and contravariant by argument 
types.  People will look at that statement and say "but how 
could Person->Person be a generalization of Object->Person?".

The answer lies deep in the way blocks are allowed to be used 
(by the "meta-rules").  Not counting reflection (which typically 
involves dynamic type-checking), the only things you can do with 
blocks are pass them around and evaluate them.  Passing them 
around may involve storage in local variables or instance 
variables.  To evaluate a block you must supply arguments more 
specific than what the block requires, and you'll get back 
something more specific than what the block's type says you'll 
get.  From the block's point of view, its contract says that it 
will get arguments more specific than its type specifies, and 
must return something more specific than its return type.  
Notice that each viewpoint is such that the types of actual 
instances are always more specific than declared types.  This 
guarantees LSP (at the type level).

Even though we often think of freedom as a "positive" thing and 
restriction as a "negative" thing (in the logical sense, not the 
moral sense), this intuition might have to be reversed for our 
analogy.  Think of it this way:  You can't "grant" a freedom, 
you can only take it away.

If you provide software with a restriction, the restriction 
restricts the actions of the users of the software (i.e., it 
removes a freedom from the consumer).  GPL seems to be trying to 
restrict what restrictions the user may *add* (for a subsequent 
end-user), which can probably be shown to be an internally 
inconsistent restriction (rough sketch: try applying it twice, 
180 degrees out of phase, to produce a contradiction).  A 
contradiction in this sense simply means that somewhere down the 
road a user is required to (1) do X, and (2) not do X.  If such 
a contradiction can be shown, it would actually be illegal for 
that individual to own a copy of the software, regardless of 
intent.  I don't think it means that a user is not allowed to 
distribute the software under any circumstances, because that's 
just an ordinary restriction.  If these intuitions are correct, 
it may also mean that GPL is not only one of the farthest 
possible things from freedom, but it might even be possible to 
incorporate (illegal) discriminatory clauses via 
constructive/destructive interference of separately 
non-discriminatory clauses.  Just an idea, in case anyone ever 
needs to tear down the whole concept of GPL licence in court.

Hm.  I never really congealed an analogy with co/contravariant 
types, but I think (and hope) the gist of the argument survived.





More information about the Squeak-dev mailing list