Re: Is there ever a good reason to create globals in Lisp?
Christopher Stacy <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
Global variables are used as the simplest implementation of the "singleton pattern". People use them often for bootstrapping, as a database, fixed enumerations, etc. There is no need to fetishly implement a superfluous container (such as a class instance, whose pointer you need to pass around) for things like that, when you could just as easily refer to the plist or hash table *global-reasons-for-global-variables*. A related concept you should look into are "special" variables, which have different scope. You should read these: http://www.flownet.com/ron/specials.pdf http://www.gigamonkeys.com/book/variables.html ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel