5 ms·
restore encapsulation (then get rid of the g pointers). Global variables begin with g http://root.cern.ch/root/htmldoc/guides/users-guide/GettingStarted.html#
by Create 12y ago
restore encapsulation (then get rid of the g pointers).
Global variables begin with g
http://root.cern.ch/root/htmldoc/guides/users-guide/GettingStarted.html#coding-conventions http://root.cern.ch/root/htmldoc/guides/users-guide/GettingS...
While it's true that indiscriminate use of global variables can turn code into spaghetti nearly as quickly as unrestrained use of goto, global variables do have legitimate uses and exist in one form or another in almost every programming language.
Lisp's version of global variables, dynamic variables, are both more useful and more manageable.
Common Lisp provides two ways to create global variables: DEFVAR and DEFPARAMETER.
http://www.gigamonkeys.com/book/variables.html http://www.gigamonkeys.com/book/variables.html