[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: globals (_locals)
- From: Jean-Claude Wippler <jcw@...>
- Date: Sat, 2 Jun 2001 13:04:11 -0700
Terence Martin <email@example.com> wrote:
>Naturally, many people (including myself) wouldn't favour this one based
>purely on the total distaste of having a naming convention of any type
>forced on them. This is like saying that since most people in C #define
>constants that are all upper case, why not remove the const keyword and just
>say that if you want something to be const, make it's name all uppercase,
>and it magically will be.
Interesting idea. Just like the word "SHOUT" means something different
from "shout" to many people. Quite natural, btw.
If this were about taste, then this discussion is unresolvable -> futile.
The reason I suggested naming schemes, is because that's the issue: scope.
>As for my own idea lots of people will hate:
>- introduce global as a keyword to make a variable global
>- leave the current defaults alone
>- introduce a new mode where variables must be explicitely declared before
>- make the new mode swtichable either by a compile-time flag or a command
Your proposal would cause trouble when code from more than one person
(large projects, libraries) needs to be combined. Lua evolved to get rid
of the one compile mode it had ($debug, I think it was called).
I can assure you that this is not about like/hate, or taste/distate.