lua-users home
lua-l archive

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


> Useful, but I don't think we need an extra symbol. We could have "raweq"
to
> test for raw equality, just like we have "rawget/rawset" for the indexing
> symbol "[ ]".

This has been hashed out at length on the mailing list, so I won't go over
old ground again. There is a raweq function, by the way.

> They keep two, which could then be made contradictory. Why? If
> the authors didn't want to supply the whole set (lt, le, gt, ge) why
didn't
> they just reduce it to a single operator?

This has also been hashed out at length on the mailing list.

If a < b is not the same as b > a, then you probably shouldn't be using
things that look like comparison operators.

Having both < and <= is useful in cases where one or the other is
easier to implement. In partial ordering, <= is often easier to implement.
That's why.