I would like to able to define a static variable inside a Julia struct. E.g I would like to define something along the lines of:
mutable struct MyStruct
global const a = 1
b = 2
end
Then I would like to be able to access a, in a similar fashion to static constants in the Java or C++ languages, e.g:
MyStruct.a
I am very well aware that this way of writing code is not-Julian, and that I just could use a module for this purpose.
However, I am interested in whether it is possible or not for mutable structs. E.g I am interested in in details why this is not possible and techniques to emulate this pattern of programming.