lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Saturday, January 10, 2015, Kevin Clancy <kclanc@gmail.com> wrote:
If that's the definition of nil, then what is the definition of null? They seem like the same thing to me.

I think most people associate null with C null pointers. They're different from (and more dangerous than) high level scrpting nils. In a dynamically typed language, nil can be an exceptionally useful concept. I'm far less sure about the role of C null in a statically typed language (which, I believe is conceptually closer to what he refers to as the huge mistake).
 

On Fri, Jan 9, 2015 at 5:43 PM, Erik Hougaard <erik@hougaard.com> wrote:
On 09-01-2015 09:08, Enrique Arizón Benito wrote:
the invention of null (nil) references

"nil" is not null. I think you're trying to solve the right problem in the wrong place.

To quote the manual: "Nil is the type of the value nil, whose main property is to be different from any other value; it usually represents the absence of a useful value."

/Erik