alcides / aeon

Aeon programming language
https://alcides.github.io/aeon/
8 stars 3 forks source link

Optimising selective imports #64

Open eduardo-imadeira opened 5 months ago

eduardo-imadeira commented 5 months ago
import b from a.ae
import c from a.ae

Currently, the example above is parsing a.ae twice. Ideally, we would only want to parse it once and store that information in cache in the case of needing it more than once.

alcides commented 5 months ago

In order to implement this, we would need to load all the imports, merge the symbols from files and then perform the import.

Instead, maybe we could go for something like

import b, c from a.ae

or

from "a.ae" import b, c