lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 11/04/2011 18.07, Luiz Henrique de Figueiredo wrote:
2. Is the underscore itself to be considered an uppercase letter? I.e.
is __VERSION (two underscores at the beginning) to be considered reserved?

The manual says in http://www.lua.org/manual/5.1/manual.html#2.1 that
__VERSION is not considered reserved. Sorry for the noise.



Sorry, but I don't see anything stating that clearly. More specifically (3rd paragraph - emphasis mine):

Lua is a case-sensitive language: and is a reserved word, but And and AND are two different, valid names. As a convention, names *starting with an underscore followed by uppercase letters (such as _VERSION)* are reserved for internal global variables used by Lua.


My doubt was whether the underscore is to be considered uppercase, in which case __VERSION would be reserved. If the underscore is not to be considered an uppercase letter, then __VERSION would not be reserved (since in a previous message you clarified reserved names are _all_ uppercase). Therefore I think your clarification was needed (unless one sticks to the lexicographic meaning of "letters", but there are some computer languages in which the underscore is considered a letter, hence my doubt).

Am I missing something?