mauro wrote:Well, didn't you put "modules" in the current standard in this forum?
I'm not following you. There is a *published* ISO standard for Prolog modules. The current forum categories and individual forums simply reflect the current published standards and the current work being done on Prolog standardization.
mauro wrote:However, I agree with you in respect to my little experience. Once one is working with module predicates, ISO is gone.
On the contrary, as a Prolog user (neither commercial nor academic, I stresss this), I disagree with you when you deal with the current "shacky ground" for building something else (hopefully, object oriented programming).
Try the following experiment: rewrite your OOP package in order to run on most Prolog compilers that support a module system. Get back to us with your findings.
mauro wrote:Probably this is the reason because it is NOT part of the standard, yet.
See above. There is already a module standard. Is just that nobody cares about it.
mauro wrote:Paulo Moura wrote:...the use of explicit module qualification is often discouraged (some Prolog implementers go as far as suggesting that this feature be dropped) and usually implies a performance penalty...
Indeed, I cannot see one single reason to keep it, too.
Without an explicit module qualification mechanism, you need an alternative solution for solving name conflicts. For example, assume that you have two modules, "lists" and "sets", both providing a member/2 predicate, and a third module importing the first two. How are you going to distinguish between calls to lists:member/2 and sets:member/2? The solution that you find in the libraries of Prolog compilers that support modules is to rename one or the two member/2 predicates in order to solve the conflict. Thus, you use modules to get namespaces and then, in order to use module predicates, you rename the predicates you want to export. Pathetic. If any renaming is needed, it should be done in the module importing the predicates, not in the imported modules. Otherwise, you cannot in practical terms reuse vocabulary (predicate names) between modules. Btw, renaming by the importing module is usually done for solving a conflict (in alternative to use explicit qualification) or to get a predicate name that is more meaningful in the context where it is being used.
Moreover, there are both advantages and disadvantages for both implicit qualification and explicit qualification. That's why most programming languages with encapsulation mechanisms support both forms of qualification.
All the best,
Paulo