import utils.mathx from stdlib.math import pow
Dotted imports map to paths:
utils.mathx -> utils/mathx.lpp
utils/mathx.lpp:
utils/mathx.lpp
def double(x: Int) -> Int: return x * 2 def triple(x: Int) -> Int: return x * 3
main.lpp:
main.lpp
import utils.mathx from stdlib.math import pow def main(): print(double(21)) print(triple(10)) print(pow(2, 8))
When the compiler sees an import, it searches:
.lpp_packages/<package>/...
stdlib/
lpp new app cd app lpp add lpp-zip lpp install lpp build lpp run
The JSON registry is hosted through GitHub Pages:
https://samarnever-droid.github.io/lplusplus/registry/index.json
Packages currently include:
lpp-zip
lpp-math
lpp-strings
lpp-collections
lpp-algo
lpp-convert
Alias syntax is parsed:
import utils.mathx as mathx
Namespace behavior for aliases is still experimental, so stable examples should prefer plain import module or from module import item.
import module
from module import item
There was an error while loading. Please reload this page.