It's a long story...
In the beginning Variables were just regular global variables and Constants were "extern" global variables. Then I started thinking "Hey, what if I remove the Constants and put a checkbox to turn any Variable into "extern" parameter?". And obviously I did that. But immediately I found a small problem...
In MQL5 you can define "extern" variable and then modify it in the code. But in MQL5. Try this MQL5 code:
input int inp = 0;
void OnInit() {
inp = 1;
}
It can't be compiled, it says "'inp' - constant cannot be modified"
If I use "extern" instead of "input", then there is no compile error, but also the variable is no longer an input parameters, it's like the keyword "extern" does nothing for MQL5.
Only in MQL4 and only if you use the keyword "extern" you can have input parameter that can then be modified into the code. But this behavior is for legacy reasons.
So, having input parameters that can be also modified in the code was (and still is) forbidden in MQL5 and even in MQL4 (when you use "input"). That's why after I added those checkboxes for the Variables I almost immediately regretted.
What is the situation today? In the output code of the web version of fxDreema, both Constants and Variables are not global variables. They are members of two separate classes. This means that they all can be modified. But there are some problems again. I found that for people with many many Variables, the code is compiled very slowly. I guess that having classes with too many members is not good idea. So I'm now thinking to make Constants and Variables global variables again.
There are some technical difficulties as you can see and this determines my decisions 🙂