lua-users home
lua-l archive

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

On Fri, Feb 19, 2010 at 11:51 AM, Geoff Leyland
<> wrote:
> Really?  May I ask in exactly what context?

It was when I was experimenting with symbolic expressions (in fact the
work that you found useful!). In Penlight, the relational problem is
that if I have a placeholder expression like _1 > 0, it won't work
directly and the 0 needs to be wrapped - but _(0) isn't quite so

Generally, the problem appears whenever we create proxies for numbers
(e.g. BigNum) and wish to directly compare them with numbers.

> I imagine that at the moment all the mechanisms are there: metatables are respected if they match, and any value you return is converted to boolean in the operator.

I don't know what the overhead would be in practice, but imagine that
there are some shortcuts the VM can't take anymore.

steve d.