[JSR308] array-valued annotations

David Wagner daw at cs.berkeley.edu
Mon Jan 29 22:34:10 EST 2007


Tom Ball writes:
>It sounds like we are in agreement, but I prefer the term "contract" 
>(from Eiffel's "Design By Contract") to "type" when using metadata to 
>provide additional information to error-checkers regarding an API.  My 
>guess is that the JSR's spec will be less confusing by keeping these 
>concepts separate.

Well, I don't share that preference.  A type is not the same thing as
a contract.  I prefer to use the term "contract" when it is right to do
so, and the term "type" when that is right.  Some error-checkers work
by methods that are better understood as type-checking than as anything
having to do with Eiffel's "design by contract"; others, just the reverse.
(For instance, a type-qualifier system like CQual or JQual would be a good
example of something best understood in terms of types, not contracts;
in comparison, something like JML is about contracts, not types.)



More information about the JSR308 mailing list