[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [local] <namelist> = do <block> =<explist> end
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 18 Aug 2015 20:11:09 +0200
2015-08-18 19:14 GMT+02:00 Soni L. <fakedme@gmail.com>:
> I'd like a way to do
>
> local v
> do v = 3 end
>
> without assigning nil to v.
You can't have that in principle. No name can ever not be
associated to a value. If you don't do
local v=3
(why on earth don't you?) then Lua explicitly supplies the nil.
Otherwise that slot would contain whatever was in it before
(which may be a user's unencrypted password) and all sorts
of security holes open up.