[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: continue/repeat...until false dichotomy
- From: Matthew Wild <mwild1@...>
- Date: Wed, 17 Feb 2010 17:43:07 +0000
On 17 February 2010 17:37, Kelley, Brian <bkelley@qualcomm.com> wrote:
> On Feb 17, 2010, at 4:27 AM, Alex Davies wrote:
>> The only problem is there is no clear and obvious way the code should
>> function, so my stance has always been throw a meaningful error. It's not a
>> hard one to catch at all, requiring only a minor modification to the
>> parser..
>
> Why is it not clear and obvious that a newly-created variable's value will be nil unless it has been assigned some other value?
>
> People can use 'if' to skip assignments, also. I don't hear people worrying needlessly about that, or clamoring for the compiler to emit warnings in those cases.
>
Forgive me if I'm wrong but nowhere is it possible in the current Lua
to skip a "local" declaration and still be able to access the local
variable that that statement declared.
Matthew
- References:
- continue/repeat...until false dichotomy, Kelley, Brian
- Re: continue/repeat...until false dichotomy, Florian Weimer
- Re: continue/repeat...until false dichotomy, Kelley, Brian
- Re: continue/repeat...until false dichotomy, Matthew Wild
- Re: continue/repeat...until false dichotomy, Kelley, Brian
- Re: continue/repeat...until false dichotomy, Matthew Wild
- Re: continue/repeat...until false dichotomy, David Given
- Re: continue/repeat...until false dichotomy, Alex Davies
- Re: continue/repeat...until false dichotomy, Kelley, Brian