[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: A little bit about nothing (was Re: Empty? No. Array? No. Has? Yes.)
- From: Sean Conner <sean@...>
- Date: Wed, 3 Jul 2013 12:20:16 -0400
It was thus said that the Great Sean Conner once stated:
> It was thus said that the Great Roberto Ierusalimschy once stated:
> > > Well, I cannot speak for a 'community of best practice' but this is how I
> > > see the problem. Lua does not have null, as understood in other languages.
> > I think it does: it is called 'nil'. What Lua does not have is a way to
> > store 'nil' in a table.
> There are two concepts here, reflected in the following code:
> x = function() end
> y = function() return nil end
Some further observations on this topic . Let's flip this around a
function something(mary) --[[ something about mary ]] end
In straight Lua, there is no way for something to know if it was called
In other words, was something given nothing? If something was written in
C, then yes, something can make the distinction between nothing and nil, but
in Lua, not so much (which is why type can error out with "type()" but not
What does the following mean?
a = function() end
b = function() return nothing --[] end
c = function() return nil end
Should nothing only exist in the context of a table entry? Did the
previous question even have meaning in the context of language? How can
nothing exist, context or no? 
-spc (Or are we all being nihilistic here?)
 Yes, I'm procrastinating at work. Looking at core files of stripped
executables will do that to a person.
 Assuming nothing existed in Lua.
 Okay, *now* I'm being silly.