Hi community,
I am preparing a package for Maxima and I wonder if I can declare
variables/functions local to the package, so that only functions defined
within the package will have access to those variables.
define_variable defines global variables which is not what I want.
localdefines local variables or functions, but only inside a block. I
am looking
for something like local but package-oriented, not block-oriented. For
example, suppose package foo.mac defines 2 global functions A and B. I am
looking for a way to declare a variable/function C which would be local to
the package, so that only functions A and B will have access to it. Such a
local variable/function should not be visible to any other function defined
outside foo.mac, so that typing values; in a Maxima session won't even list
it.
Such a functionality, often called data hiding, is absolutely necessary for
creating something more complicated than a simple package, so I guess there
is a way to do it in Maxima, although I was not able to find a way by
looking to the documentation.