Re: Are Logtalk objects "real" objects?...

On Apr 8, 1:56 pm, A.L. <alewa...@xxxxxxxxxx> wrote:
On Tue, 8 Apr 2008 01:56:38 -0700 (PDT), Paulo Moura

<pjlmo...@xxxxxxxxx> wrote:
Nevertheless, If you really want to use Prolog modules as Logtalk

No. AI don't want to use modules as objects. As I said, objects and
modules are different things.

In the context of Prolog, both modules and (Logtalk) objects share the
property of encapsulating predicates. This, of course, does not imply
that they are the same concept in disguise. Crossing to other
programming languages, one easily finds many variations (and
materializations) of both concepts.

See Clemens Szyperski paper

Import is not inheritance - Why we need both: modules and classes

from here

The link to the paper is broken. Maybe you can describe the basic
ideas with your own words, preferably in the context of Prolog?

It is known for quite a long time that we need both: modules and
objects. They perform different functions. There are many languages
that have both, modules and objects.

I would like to have the same in Prolog.

Unfortunately, SICStus objects don't know about modules...

Are you looking for a definition of modules as a higher-level
(compared to objects) encapsulation solution? I.e. where a module can
encapsulate several objects? Where modules provide namespaces for
objects? Not having read the paper, I'm not sure of what properties do
you want from a Prolog module system. I guess if you want a different
kind of Prolog modules, which fit the ideas in the paper you cite
above, you will have to develop it yourself.

Best regards,



Relevant Pages

  • Re: discovering predicate name
    ... > with gprolog to make a little and basic expert system. ... > if there's anyway I can check these predicates in order to taylor the ... context of facts by asking the user various questions. ... In Prolog, you don't have to go rummaging around in referenece ...
  • Re: Lost in translation
    ... Outside of that context, it is a functor like any other. ... Is this not typical prolog style, ... it seems like my prolog-in-lisp translation indeed did not lose any semantics in the translation. ...
  • Re: Are Logtalk objects "real" objects?...
    ... In the context of Prolog, both modules and objects share the ... materializations) of both concepts. ... Import is not inheritance - Why we need both: ...
  • Re: Cross-Compiler development (MasterProlog/SWI/SICStus)
    ... In most Prolog applications, there are usually a small set of ... top predicates and a bigger number of auxiliary predicates. ... of the object encapsulating them. ... the configuration file for your Prolog compiler, ...
  • Re: free (or free variant) of Prolog for newbie
    ... I can't really recommend GNU Prolog for this task, due to lack of a heap ... Visual Prolog is not Prolog. ... If you're willing to consider logic programming languages other than Prolog, ... I would strongly recommend Mercury. ...