[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Implicit Globals - A compile time solution.
- From: "John Hind" <john.hind@...>
- Date: Wed, 20 Feb 2008 11:52:12 -0000
Yea, mailing list is a lousy way to have a long term discussion like this!
Maybe we could have an "architectural discussion" area of the wiki?
I keep coming across the "global by default is bad, local by default is
worse" statement, but I've never seen a convincing justification for it.
There's lots of code examples that people claim "don't do what you'd
expect", but mostly they do exactly what I'd expect! What I'd definitely
*not* expect is for a poor choice of a casual variable name in one chunk to
stomp over a global module making it unavailable to a completely different
chunk!
-----Original Message-----
From: Jerome Vuarand [mailto:jerome.vuarand@ubisoft.com]
This is not a new idea. I think you will find patch that do this in the
mailing list archive. In the same archive you will also find plenty of
topics [1][2] explaining why local by default is a worse idea than
global by default.
[1]
http://lua-users.org/cgi-bin/namazu.cgi?query=local+by+default&idxname=l
ua-l&max=20&result=normal&sort=score
[2] http://lua-users.org/lists/lua-l/2007-01/msg00258.html