
On Mon, Sep 01, 2008 at 10:45:05PM +0100, Ganesh Sittampalam wrote:
Actually all this use of the tainted and derogatory term "global variable" is causing me to be imprecise. All MVars/IORefs have "global" main/process scope whether or not they're bound to something at the top level.
"Global variable" is exactly the right term to use, if we are following the terminology of other languages. We don't call the result of malloc/new etc a "global variable", unless it is assigned to something with top-level scope.
global variable is not a very precise term in other languages for various platforms too a lot of times. for instance, windows dll's have the ability to share individual variables across all loadings of said dll. (for better or worse.) Haskell certainly has more advanced scoping capabilities than other languages so we need a more refined terminology. I think 'IO scope' is the more precise term, as it implys the scope is that of the IO monad state. which may or may not correspond to some external 'process scope'. John -- John Meacham - ⑆repetae.net⑆john⑈