Re: Prolog module system



On Wed, 13 Jun 2007 04:15:56 -0700, Paulo Moura <pjlmoura@xxxxxxxxx>
wrote:


Prolog is (or aims to be) a declarative language. Reasonable
programming solutions would be as close as possible to the original
problem specifications. There are whole classes of problems where
knowledge is naturally organized in taxonomies or classification
hierarchies. For these kind of problems, objects are arguably a better
solution than modules.

As I wrote in other message, sentence "objects are better than
modules" has little sense. This is like "car is better than cake".
Objects and modules are orthogonal concepts, and there are languages
that have BOTH. See the paper "Import is Not Inheritance Why We Need
Both: Classes and Modules" by Clemens Szyperski

http://citeseer.ist.psu.edu/szyperski92import.html

Abstract. The design of many popular object-oriented languages like
Smalltalk, Eiffel, or Sather follows a certain trend: The class is the
only structuring form. In this paper, the need for having modules
besides classes is claimed. Modules stem from a different language
family and at first glance it seems that they can easily be unified
with classes. Among other things, unifying modules and classes carries
the danger of unifying the import and inheritance relationships.
Constructs in several languages are discussed that indicate that
modules and classes should indeed be kept separate.

A.L.
.