lua-users home
lua-l archive

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



On Wed, Jun 4, 2014 at 2:41 PM, Javier Guerra Giraldez <javier@guerrag.com> wrote:
i guess part of the reasons are like this: if two "objects" have
different __eq function, which do you use to compare them?  it's
easiest to assume they're already different enough.

Maybe and I don't want to assert that the way that it is designed is wrong, given my limited experience. That said, I can remember one other time that I hit an issue like this and it left an impression that still gives me pause, whenever I want to use comparative metamethods. 

Presumably, the limitation guards against super-ugly code that's hard to debug. One wonders if it's harder to debug wonky type comparisons or something buried in your code that fails every 1 in 2-10 times, but only inside of busted[1]?

-Andrew

[1] It may fail elsewhere. I'm not sure.