lua-users home
lua-l archive

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

> To me it seems natural that I should be able to get a Boolean value as a
> string, but perhaps that's not the intention?

The problem with this conversion is that it is not reversible. Assuming
the obvious conversion, we have that false(b) -> "false(s)", but
"false(s)" -> true(b) (any string is non-false). So, we prefer not to
perform it implicitly.

(Actually, the conversion between numbers and strings is not completely
reversible, too: "0003" -> 3 -> "3". But most of the time it works as
we expect.)

-- Roberto