[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: All your local are belong to us
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 2 Oct 2015 10:28:30 +0200
2015-10-02 1:52 GMT+02:00 Egor Skriptunoff <egor.skriptunoff@gmail.com>:
> Every Lua beginner makes the same mistake: using local variables in
> interactive mode of Lua standalone interpreter.
Those of us who post code snippets on Lua-L with officious "local"
statements in it, making it unrunnable in the standalone, must bear
at least part of the blame for that. Especially so if that code purports
to answer a newbie's question.
> Probably, it is worth to display a warning "Local variables are lost
> due to end of chunk" (or the like) after every chunk consisting solely
> of locals definition entered by user in REPL.
This could be a useful feature for one of the customizable REPL's
that people announce here from time to time (can't remember the
names, please put up your hands) but IMO does not belong in
"a sample host program called `lua`".