[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Idea. Removing nils from the language.
- From: Mike Nelson <mikestar1313@...>
- Date: Sat, 10 Jan 2015 14:08:52 -0800
On 1/10/2015 9:09 AM, Enrique Arizón Benito wrote:
(various statements about 'nil' I will not quote)
My take on what Enrique is saying is not that he objects to the
existence of the Lua value nil as such, but to the implicit
initialization of variables to nil when no other value is specified.
Then what is being asked for is to require all variables to be
explicitly initialized (even to nil, if the programmer explicitly codes
the intention to do so).
So,
local x
do_something() -- function which may use x
would no longer be legal Lua code, but
local x=nil
do_something() -- function which may use x
will continue to be legal.
This is a change I would have supported if we were hashing out the
specifications for Lua 1.0, but version 5.3 is much too late to make
such a severely breaking change, IMHO.
Enrique, is my understanding of what you are saying anything like what
you are trying to say?
-- Mike Nelson