[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Saving a table in file
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 11 Mar 2010 08:32:19 +0200
On Tue, Mar 9, 2010 at 8:45 PM, spir <denis.spir@gmail.com> wrote:
> FWIW: I found this convention fully self-understanding in your code samples.
It's true that Hungarian has gone out of fashion and never was part of
the dynamic scene, but naming function _arguments_ in a clear
conventional way does make life easier for the user who has to
understand that function.
function fun(sName,nAge,lChildren)
where s means 'string', n means 'number', l means 'list' (in the sense
of an array-like table). And so forth.
>From that, you can pretty much generate good initial LuaDocs stubs ;)
Using explicitly named types wherever possible is also helpful:
http://lua-users.org/lists/lua-l/2009-08/msg00142.html
And then, if our named 'struct' was Fred, then aFred makes perfect sense.
steve d.