plume-lang / plume

Plume is a lightweight programming language that aims to be portable, powerful and easy to learn.
MIT License
12 stars 2 forks source link

Improving module resolution #26

Closed thomasvergne closed 3 months ago

thomasvergne commented 4 months ago

The current module resolution is fully working but lacks security features. For instance, isolation between modules is terrible, an imported module A in a module B could be accessed in a module C that imports module B. So, we shall implement a better isolated module resolution by renaming every imported variable with a qualifier associated with their name. This would highly impact the current codebase as it depends much on this "breach".

thomasvergne commented 3 months ago

Working on better module resolution in PR #29. We're able for now to check for undefined variables and interfaces in extensions. Existence checking on types will be implemented in the future.

We implemented public requires, letting the user export some requires, like what's done with variables. I'm thinking of implementing such a keyword on variable declarations too.