Actually, we got 2 builtin function: include() and require(). Both of them are available only inside methods body. The proposition is to:
- make ‘require’ available only on the global scope in order to include source files containing classes.
- make ‘include()’ available only inside methods body, to include a part of code that will be executed during method call. Such code should be a valid AerScript code that can be executed inside method body (just like using ‘eval()')
Thus ‘include()’ would be still a builtin function, while ‘require’ would become a language construct. Having that, ‘include()’ should allow to include code several times (i.e. in loop), while require should work as ‘require_once’.