The Artima Developer Community
Sponsored Link

Interfaces, Classes, Abstract Data Types, syntax and semantics



This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Interfaces, Classes, Abstract Data Types, syntax and semantics

Posted by John Caron on 24 Nov 1998, 4:53 PM

I think of interfaces as a "pure" specification of an abstract data type (ADT). The public members of a class also define an ADT. The class itself is clearly an implementation of an ADT.

The main function (as I understand it) of an ADT is to formally define sets of objects so that set membership is well defined (strong typing). Inheritence is then a subset relationship.

In the current state of the art (eg Java) all we have is "syntactic" data typing (matching method name and parameters). Semantic data typing will eventually be moderately successful in very narrow application domains, but will never be able to do what a human mind can do, and so natural language comments / documentation will always remain necessary.

Well, never's a long time. Lets just say past _my_ event horizon.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us