[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why not Just PHP-stupid include?
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 19 Oct 2011 13:45:14 +0200
On Wed, Oct 19, 2011 at 1:13 PM, Patrick Mc(avery
<patrick@spellingbeewinnars.org> wrote:
> I do not want globals at all, only a simpler environment to type in-Patrick
When I used module(), I didn't use package.seeall because it was ugly,
so I had to do a lot of this kind of typing up front:
local io,print,getmetatable = io,print,getmetatable
Etc - it does get tedious. Now there are several ways around this
_typing_ problem; one is to some kind of preprocessing and the other
is to make your editor smarter. Abbreviations help (e.g. defining
'lf' as an abbreviation for a local function block)
But this is the kind of thing that a clever editor can do. I type
local io,print,getmetatable from _G
and run an editor macro - in fact, that macro could be triggered by
simply entering a newline, which is useful because it's hard to
remember all the macros one's defined.
The result is less .. typing, and the code remains reasonably readable.
(I recommend SciTE as a good clever editor that's scriptable in Lua,
but that's just me)
steve d.
- References:
- Why not Just PHP-stupid include?, Patrick Mc(avery
- Re: Why not Just PHP-stupid include?, Florian Weimer
- Re: Why not Just PHP-stupid include?, Patrick Mc(avery
- Re: Why not Just PHP-stupid include?, Daurnimator
- Re: Why not Just PHP-stupid include?, Patrick Mc(avery
- Re: Why not Just PHP-stupid include?, Luiz Henrique de Figueiredo
- Re: Why not Just PHP-stupid include?, Josh Simmons
- Re: Why not Just PHP-stupid include?, Patrick Mc(avery
- Re: Why not Just PHP-stupid include?, Tomas Guisasola Gorham
- Re: Why not Just PHP-stupid include?, Patrick Mc(avery