[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: new "empty" value/type in Lua?
- From: Jorge <xxopxe@...>
- Date: Fri, 28 Jun 2013 19:14:18 -0300
On 28/06/13 18:24, Roberto Ierusalimschy wrote:
Maybe I am missing something obvious, but Lua already has an "empty"
value. It is called "false".
Now maybe I am missing something obvious :)
But empty is not a noun, is an adjective. Something can be empty. To be
capable of being empty, it must be capable of holding something in the
first place. Thus a table. This leads to
empty = function(t) return next(t)==nil end
If I want store emptiness, I should wrap all my stuff in tables
t[x] = nil --nothing
t[y] = {'stuff'} --something not emptiness
t[z] = {} --something: emptiness
I consider this argumentation completely irrefutable. Hope nobody
restarts it using the term "void" :-\
Jorge
- References:
- new "empty" value/type in Lua?, Tim Hill
- Re: new "empty" value/type in Lua?, Rena
- Re: new "empty" value/type in Lua?, Andrew Starks
- Re: new "empty" value/type in Lua?, Tim Hill
- Re: new "empty" value/type in Lua?, Philipp Janda
- Re: new "empty" value/type in Lua?, Tim Hill
- Re: new "empty" value/type in Lua?, Enrico Colombini
- Re: new "empty" value/type in Lua?, Andrew Starks
- Re: new "empty" value/type in Lua?, Tim Hill
- Re: new "empty" value/type in Lua?, Roberto Ierusalimschy