[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.0 (final) now available
- From: tomas <tomas@...>
- Date: Wed, 14 Jan 2015 16:13:28 -0200
Hi Roberto and Jorge
But what value could be that error indicator? Or you thought about
changing the whole model to something like exception handling
constructions? In that case the error indicator would be internal to
the VM no?
If the function was just returning nothing, that would be ok. But
in fact it is returning an error indicator followed by the error
message. To mix an error indicator with an absent value is what
But nil is not a value.
Yes. I would call it a non-value (something like NaN ?)
In SQL, NULL is that kind of value. And the mapping of NULL to nil is
quite natural, although sometimes the programmer have to take care (for
instance, not to make a query that could result in NULL at the first
column of a valid row).
And if a
application has some other meaning for nil besides "absence of value",
perhaps something from the application domain, then I think said
application is badly designed. In that sense, in application domain,
nil is not a "perfectly valid return"
In fact, I think part of this discussion also applies to the domain of
database languages such as SQL.