First, let me recall Sylvain's message:
---------------------------
Hello forum,
In Claire we have the 'private' specifier that binds a symbol
visibility to a module and its parts. It would be nice to have
a 'static' specifier that would bind the symbol to the module only.
In some situations, such an assumption would let the compiler
generate a lighter meta load by omiting:
- the creation of the symbol
- the instanciation of associated property and restriction
This would be possible only if associated restrictions are accessed
staticaly which is often the case for local 'tool' methods.
As a consequence, the module library would be smaller, claire
database wouldn't be polluted with useless symbol and properties and
last the module metaload would be faster.
Sylvain
-------------------------
I think that Sylvain's idea is brilliant ! It would require actually
quite some work ... except that this work was done for the Diet
compiler (making sure that the generated code works even without
the "meta-description" part).
It would also solve the optimization of global variable issue: if you
remember, when you compile a local variable that is local and if you
use -O, claire generates faster = lighter code.
So the question is:
- do we need a new static modifier
- should we use private ?
Indeed, a private symbol is accessible dynamically in the namespace
of the module only, which means that "dynamic accessibility" is a
tricky feature....
I would like everyone's input on this: do you prefer a new mofifier
or should we decide that all private names are static ?
Make your opinion known and cast your vote !
-- Yves