Re: Prolog module system



On Wed, 13 Jun 2007 06:05:44 -0700, Paulo Moura <pjlmoura@xxxxxxxxx>
wrote:



There are two major types of OO systems: class-based ones and
prototype-based ones. You start your sentence by talking about objects
(apparently in a broad sense) and end it with a reference to classes.
[...]

Prototypes can fulfill the role of modules. That's way Logtalk
supports both prototypes and classes. Prototypes are a much better
plug-in replacement for Prolog modules than classes. Logtalk also
supports categories (think components, aspects) that provide you with
importing semantics. *Classes* are not the only structuring form in
Logtalk.

There is a book about prototypes: "Object Oriented Programming with
Prototypes" by Guenther Blashek, Springer Verlag 1994 vere the author
shows that conceptually prototypes are not diffrent than classes.

A.L.

P.S. By the way, there is also third OO model: types extension. It is
used in Oberon and Ada.
.



Relevant Pages

  • Re: Prolog module system
    ... programming solutions would be as close as possible to the original ... Objects and modules are orthogonal concepts, and there are languages ... Prototypes can fulfill the role of modules. ... That's way Logtalk ...
    (comp.lang.prolog)
  • Re: Prolog module system
    ... supports both prototypes and classes. ... Logtalk also ... Classes represent abstractions. ... instantiation (and no, ...
    (comp.lang.prolog)
  • Re: Simulating inheritance with a metainterpreter
    ... Paulo Moura wrote: ... > prototypes but Logtalk also supports classes and instances if you ... > prefer an alternative solution): ... Does Logtalk support something which is more in the spirit of the original ...
    (comp.lang.prolog)