Closed ghost closed 6 months ago
Adept 2.x's namespaces are not really namespaces unfortunately, due to issues that arose from the design of the compiler. They are more just glorified prefixes like in C, just with some syntactic sugar to make it easier in some places.
The namespace/module system needs to be improved and I am still designing how they should work in Adept 3.x.
I don't know a whole lot about Delphi or Modula-3 modules, but the plan is proper modules similar to the semantics of Python.
Nothing about modules is finalized yet though, there are a few things which I want the module system to be capable of including:
import a::{self, b, c, d::e, f::{g, h, i}, j, k::*, l::m}
(if import statements are necessary)I have a few ideas to try to satisfy the above as well as possible, but what each would entail still needs some additional research
Should Adept support the concept of Modules like what of Modula-3? In Delphi, we also have Units. In Go, they also have Packages. I know Adept already has support for Namespaces, though. But Adept's Namespaces use
\
. Modules, if will ever be added, will use the dot like in Modula-3, Delphi, and Go.https://github.com/AdeptLanguage/Adept/wiki/Namespaces
Disclaimer: I admit I know very few about Adept's Namespaces. I'm not even sure if they are the same thing as Modules.