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,