Ampersand
Ampersand copied to clipboard
feature: Name spaces
@Michiel-s, @stefjoosten , and @hanjoosten have discussed an implementation of the multi-context functionality. We have agreed on the following:
- A pattern is a namespace, so we'll drop the keyword
PATTERN
in favor ofNAMESPACE
. - Every namespace is defined in one file.
- The filepath from the root including filename (without extension) is the name of the namespace.
- Syntax conventions similar to Haskell except for a good reason.
- Importing yields a disjoint union of namespaces. The imported names are prefixed with the name of the namespace and a dot. (like the qualified import mechanism in Haskell). Syntactical details are yet to be determined.
- The word namespace is synonymous to the Haskell word 'module'. We prefer 'namespace' to remain close to the modelling world (as opposed to the programming world).
- The universe is populated with namespaces
- A namespace may contain contexts, relations, concepts, rules, and services and other statements.
- The
INCLUDE
statement becomes obsolete. TheIMPORT
statement enhances the namespace with the disjoint union of both namespaces. - The
EQUALS
statement allows the user to equate named objects.
We'll implement this in a feature branch. This will lead to a release that is NOT backwards compatible.