Re: Prolog module system



On Jun 12, 6:49 pm, bart demoen <b...@xxxxxxxxxxxxxx> wrote:
...
I have seen Jan's replies and I agree with him: one can do this
minimalistic ADT thing in Prolog with the current module system
with only minimalistic surgery to the module system - I would go
with that instead of poluting Prolog with OO concepts.

I completely fail to understand your use of the word "polluting"
above. Would you say or write that module concepts pollute Prolog?
Your comment above seems to carry a scent of prejudice. Am I wrong?

Modules provide encapsulation features to plain Prolog.
Objects provide encapsulation features to plain Prolog.

Module relations define paths and patterns for code reuse.
Object relations define paths and patterns for code reuse.

Module concepts can be applied to imperative, functional, and logic
languages.
Object concepts can be applied to imperative, functional, and logic
languages.

In fact, objects and modules, as encapsulation mechanisms, are
orthogonal to the programming paradigm used in the subjacent language.
Should I go on?

Which module characteristics do you think make it more suitable as an
encapsulation mechanism for Prolog when compared with objects?
Tradition does not count.

Which object characteristics do you think that do not fit well in a
logic programming environment?

All the best,

Paulo

.



Relevant Pages

  • Re: Prolog module system
    ... with only minimalistic surgery to the module system - I would go ... with that instead of poluting Prolog with OO concepts. ... Would you say or write that module concepts pollute Prolog? ...
    (comp.lang.prolog)
  • Re: Cross-Compiler development (MasterProlog/SWI/SICStus)
    ... >> things in Prolog). ... GNU Prolog does not have a module system. ... of Prolog compilers. ... Portability between a wide range of Prolog compilers is ...
    (comp.lang.prolog)
  • Re: Prolog module system
    ... module system as done in many Prolog systems is quite bad. ... No overhead is possible in a Logtalk language implementation whenever ... The *current implementation* does incremental compilation: ...
    (comp.lang.prolog)
  • Re: Prolog module system
    ... module system as done in many Prolog systems is quite bad. ... dynamic binding plus a caching mechanism, ... The *current implementation* does incremental compilation: ...
    (comp.lang.prolog)
  • Re: Prolog module system
    ... Consider, for example, the "dictionary" ADT. ... implement dictionaries in Prolog using e.g. different types of trees. ... with only minimalistic surgery to the module system - I would go ...
    (comp.lang.prolog)