[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: WANTED: POSIX compatible getopt
- From: David Given <dg@...>
- Date: Sat, 10 Jan 2009 16:40:57 +0000
Aleksey Cheusov wrote:
[...]
> I'd like to somehow separate (visually) code in a module into two
> sections: export (list of exported functions, variables etc.) and
> implementation (internals that should not be used outside this
> module). Is there naming conventions for this in Lua?
That's normally done by scoping; internal functions are defined as local
variables rather than as module members.
local function internalfn(...)
end
function externalfn(...)
internalfn(...)
end
This also has the advantage of being faster and using less memory, too.
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "A line dancer near a graduated cylinder, the blithe spirit inside
│ some wheelbarrow, and a tomato are what made America great!" ---
│ received via spam
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- WANTED: POSIX compatible getopt, Aleksey Cheusov
- Re: WANTED: POSIX compatible getopt, Javier Guerra
- Re: WANTED: POSIX compatible getopt, Aleksey Cheusov
- Re: WANTED: POSIX compatible getopt, Rob Kendrick
- Re: WANTED: POSIX compatible getopt, Aleksey Cheusov
- Re: WANTED: POSIX compatible getopt, Rob Kendrick
- Re: WANTED: POSIX compatible getopt, Aleksey Cheusov
- Re: WANTED: POSIX compatible getopt, Rob Kendrick
- Re: WANTED: POSIX compatible getopt, Aleksey Cheusov
- Re: WANTED: POSIX compatible getopt, Rob Kendrick
- Re: WANTED: POSIX compatible getopt, Aleksey Cheusov
- Re: WANTED: POSIX compatible getopt, Rob Kendrick
- Re: WANTED: POSIX compatible getopt, Aleksey Cheusov
- Re: WANTED: POSIX compatible getopt, Doug Currie
- Re: WANTED: POSIX compatible getopt, Aleksey Cheusov
- Re: WANTED: POSIX compatible getopt, KHMan
- Re: WANTED: POSIX compatible getopt, Aleksey Cheusov