[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: '_ENV.foo' mandatory for non-local assignment.
- From: joao lobato <btnfdp.lobato@...>
- Date: Sun, 23 Jan 2011 15:22:47 +0000
On 1/23/11, Pierre-Yves Gérardy <email@example.com> wrote:
> On Sun, Jan 23, 2011 at 06:24, Quae Quack <firstname.lastname@example.org> wrote:
>> The big objection is having to declare upvalules. You had to do this
>> in lua4.0; and it was found that the current behavior was much better.
> Indeed, I wasn't there at the time. But you also had to declare locals
> The unary % is nice btw, much better than my proposed upval keyword.
> Another option would be to make local optional, for the cases where a
> declaration is mandatory, like say, for two mutually recursive local
Now, I'll be the first to recognize that my latest message in this
list was kind of flamebait material, but honestly, I can't understand
the need to change the language.
This particular suggestion... sure you have to declare variables and
sometimes it bites you in the rear end, but the alternative seems so
much harder to understand.
I believe it's rare to find someone that learned Lua has his first
(programming) language so Lua is bound to have at least one missing
feature (there is a saying, at least here, about trying to please both
Greeks and Trojans...)
Lua has its scope and I believe that Roberto and Luiz have made it
clear that it's not about replacing Python/Ruby; frankly, that seems
to be the aim of all this suggestions.