[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.1 (alpha): Documentation "bug" and suggestions
- From: Klaus Ripke <paul-lua@...>
- Date: Fri, 2 Sep 2005 23:16:51 +0200
On Fri, Sep 02, 2005 at 10:29:22PM +0200, steffenj wrote:
> copy, numSubst = string.gsub (s, pat, repl [, n])
meaning sTheNewString, nUmSubst?
> I've come up with a simple scheme for naming my variables which i've sticked
> to for like 50.000 lines of Lua code:
> nNumber = 123
> iInteger = 123 or rReal = 1.23 to differentiate where needed
a dude named Charles Simonyi came up with a similar scheme
some time ago which is known as "Hungarian Notation".
Searching for this will lead you to endless fruitless
No doubt stock Lua is not going to trade gsub for snGlobalSubstitute,
but since it is good practice to localize (sic) imports, you may
require "hungarian" -- adds long names to all available libs
or introduce german notation using
local snGlobaleErsetzung = string.gsub -- jawoll ;P
> Personally, i feel that would make the documentation more readable if there
> were some widely accepted naming convention for all types of Lua values. It
> definetely makes scripts more readable. This has been known for decades, or
> am i wrong? ;)
there is room for all fashions.
You should not hesitate to xlat the docs to hungarian.