A proposal for `system' imports

Denys Duchier Denys.Duchier at ps.uni-sb.de
Mon Oct 1 21:50:14 CEST 2001


Currently, a "naked import", i.e. without the "at" clause is resolved
as follows: if it names a known system module, then that module is
taken, else it is assumed to name a relative user module.

This is very bad because whenever we add a new module to the standard
library, we risk breaking existing programs that worked fine until
then.  It is also difficult for a user to keep in mind all system
modules and make sure no conflict arise.

Instead, I would like to propose the much simpler rule:

	"a naked import of Foo ALWAYS means x-oz://system/Foo.ozf"

Thus "naked imports" could only be used for system modules.  This rule
is not backwards compatible, but it has the advantage of simplicity,
stability, and consistency.

A user import of a relative Foo.ozf should then be specified with:

	import Foo at 'Foo.ozf'

The issue is becoming increasingly more pressing as we move towards
the idea of an open ended standard library (thus permitting the
official adoption of such important contributions as QTk).

Comments?

-- 
Dr. Denys Duchier			Denys.Duchier at ps.uni-sb.de
Forschungsbereich Programmiersysteme	(Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45	http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50			Phone: +49 681 302 5618
66041 Saarbruecken, Germany		Fax:   +49 681 302 5615
-
Please send submissions to hackers at mozart-oz.org
and administriva mail to hackers-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-hackers mailing list