Radiance icon indicating copy to clipboard operation
Radiance copied to clipboard

Improvement: scoped declarations

Open shortercode opened this issue 5 years ago • 0 comments

Descriptions

In Radiance 0.1 the majority of declarations can only be written in the global scope. There is no technical restriction which requires this, it just adds complexity. As such the environment system should be revised to allow any declarations at either the local or global scope.

This will additionally enable code execution outside of functions, requiring the collection of such code into an initialiser block for WASM compatibility. Further work could be done to perform the generation of constant values at compile time, placing the values into a data block. This will reduce the execution time and size of the initialiser function.

shortercode avatar Aug 28 '20 12:08 shortercode