I just ran (forgetfully) into the global performance issue. after it has bitten me often enough, I will probably remember it.
I cannot use a const, because I need to change the value. But I do not need to change the type. If I could just tell julia constT that the type is constant, I am guessing that the compiler could generate better code, and my code would be less buggy, too.
Is there a plan to create a mechanism that allows fixed typing of a global?
The plan here is to allow var::T in global scope to constrain the type of var to being T much like you can created typed locals with the same syntax in local scopes. The implementation will likely be that var is stored in a const typed Ref since that behaves in the right way already and just has less convenient syntax.