lua-users home
lua-l archive

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

Paul Chakravarti wrote:
> I would prefer that this explicitly evaluated to a
> distinct 'true' type - if there is no explicit 'true' value
> it is impossible to correctly serialise the value for
> an API which expects a destinct boolean value (in
> this case specifically XMLRPC but generally true) by
> checking the type.

Scheme is a pretty serious as far as languages go and it manages to get by
with just a false type.

Maybe expecting tables (or the language) to support full marshaling
out-of-the-box is too much.  There are still cases where you want some type
associated with each field but want to allow for nil values.  For example
field "email_address" is a string but it happens to be nil right now meaning
it's invalid or undefined.  When you need that you're back to Rici Lake's
table of tables technique.