Code inclusion rework #58
Etiketter
Ingen Etikett
aerscript
bug
duplicate
enhancement
help wanted
idea
question
won't fix
Ingen Milsten
Ingen tilldelad
1 Deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
No dependencies set.
Reference: aerscript/Aer#58
Laddar…
Referens i nytt ärende
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Actually, we got 2 builtin function: include() and require(). Both of them are available only inside methods body. The proposition is to:
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'.
Additionally, 'import()' allows to load a shared AerScript module. Actually it is implemented as a built-in function returning TRUE on success, or FALSE otherwise. This gives the control to the software developer on potential fallback or throwing an exception it module is not available, when called from constructor for example. If we decide to rewrite it as language construct it would need to throw exception without ability to catch it from global scope.
Decision? I vote for having 'include()' and 'import()' builtin methods and 'require' language construct.