It would be useful to use statement like c/c++ #define.
Now const is treat as ordinary variable that can't be modified and of course consumes memory and we don't have it to much.
If I approach to limit cod looks like
setIcon('a');
instead of
define ICON_HR = "A";
setIcon(ICON_HR);
I thought a little about it and of course it's a big challenge to modify syntax o programming language. But there is simpler solution:
- allow define CONST in monkey.jungle file, it's a kind of preprocessor, it remove/add (:annotation) so it could replace on fly for example
monkey.jungle
#define const
@ICON_HR@"A"@
code.mc
setIcon(@ICON_HR@);
and new code for preprocessor it is very simple
-take code.mc
-replace(code.mc, @ICON_HR@, "A") -> temp_code.mc
compile....