lua-users home
lua-l archive

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


G'day,

[Sorry about unthreaded post... I read via the digest...]

Section 2.2 of my 5.1 manual states:

        [...]

        There are 8 basic types in Lua: nil, boolean, number, string
        function, userdata, thread and table.

        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.

        [...]

Typing in that portion of the manual by hand, I tend to feel that
there is tension between an "implicit nil" and an "explicit nil",
with "implicit nil" possibly being the best description for:

        tostring(f())

Another name for "implicit nil" might be "none", which links into the
discussion thread descriptions and the C API.  You could even split
"none" into two variants (the naming here is awkward, sorry):

        none-that-will-coerce-to-nil-upon-evaluation
        none-that-cannot-be-coerced-to-nil

My suspicion is that, with a help of a very careful author, the
description might be able to become clearer about these cases,
although this tends to run against the tendency (especially in the
first sections) to be terse, taut and economical with words --
describing essential properties, with meanings not mandated being
undefined.

Hope this helps,

sur-behoffski etc etc.