For this release, we have added two enormous features to the language, modules and exports. Yes, these improvements will allow you to not only create modules containing public and private properties accessible from the outside of a module or within the same source code file.
Replace seq([exp1, exp2])
with { exp1; exp2 }
Blocks have their own scopes as well, and returns the value of the last expression in the sequence.
Installation
Windows
Download the rsc.zip
or rsc-2.3.0.msi
file and follow the instructions in README.md
.
MacOS and Linux
Download the rsc.jar
file and run as usual with java -jar rsc.jar
New
- Added Modules.
- Added Exports and Imports.
- Added Code Blocks, returning the value of the last expression.
GlobalScope
holding exported variables. This was made possible by thunneling the evaluated expression results using a newAtom.UnitBox
back toPublicExpr
which then could add the values to the export list if it is in theGlobalScope
.- Added support for relative paths when importing exported props from another file.
- Added REPL commands for moving around in the file system, and import from files.
Learn more by looking at the newly provided examples.