lua-users home
lua-l archive

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


> 
> > From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org]
> > On Behalf Of Roberto Ierusalimschy
> > Sent: woensdag 12 december 2012 14:48
> > Subject: Re: general globals in use
> 
> > Lua has the following convention:
> >
> >   http://www.lua.org/manual/5.2/manual.html#3.1
> >
> >   As a convention, names starting with an underscore followed by
> >   uppercase letters (such as _VERSION) are reserved for variables used
> >   by Lua.
> >
> > In particular, the use of _TEST by an external library breaks it.
> >
> > -- Roberto
> 
> How do "names" relate to table keys? The _VERSION is a name, but also a
> key in _G.
> Does this mean that the common module conventions for;
>   module._VERSION
>   module._COPYRIGHT
>   module._DESCRIPTION
> (straight from copas) are also breaking the rules?
> 
> Thijs

Hate replying to my own messages, but any opinion on this? If we're updating
busted, then the _TEST global can either go into __TEST (double underscore),
or busted._TEST, or even busted.__TEST. Its just that this time around I
would like to fix it properly.

So is sometable._ALLCAPS against the convention or not?

Thijs