lua-users home
lua-l archive

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



On Jul 6, 2013, at 2:20 PM, Luis Carvalho <lexcarvalho@gmail.com> wrote:

  Interesting* NaN would actually work as a potential 'empty' then for my
  intended use, particularly as they can tunnel through the C layer also
  (though detecting them in a portable way is something I'd have to check up
  on carefully).

So you don't have NaNs in SQL? If you do, how would you distinguish between
"empty" NaN and "empty" NULL when you serialize?

Yes, this went through my mind when I saw the suggestion. SQL support for NaN is all over the place, but in my particular case I would regard a NaN in a database as illegal, and the fact that it would be interpreted as NULL is ok, though not perfect.

The R NA/NULL thing is certainly a confusing concept for many, and undoubtedly 'empty' carries similar dangers, though my original intent was actually much simpler (for example, no ternary logic, can be used as a table key etc.)

--Tim