in reply to Re^8: Wassercrats::Improved Volume 0, Number 0
in thread Perl::Improved Volume 0, Number 0

Functions are no longer really global if you put them into packages, then you have a heirarchy of namespaces for them to occupy.

How is that different than a variable that lives in a package? Isn't it also part of a heirarchy of namespaces?

  • Comment on Re^9: Wassercrats::Improved Volume 0, Number 0

Replies are listed 'Best First'.
Re^10: Wassercrats::Improved Volume 0, Number 0
by chromatic (Archbishop) on Aug 27, 2004 at 06:14 UTC

    Unless variables and functions share the same namespace and syntax (as in the case of lvalue methods), functions are different in that they also encapsulate behavior. Variables merely encapsulate values.

        But what else is a tied variable but a variable hidden behind, and accessed by, several functions? It is just syntactic sugar (yes I am simplifying it a bit). Much of the same goes for overload, do something with a variable, and a function is called behind the scenes.

        -stvn