[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.3 changes to .__eq
- From: Peter Aronoff <telemachus@...>
- Date: Sun, 12 Jul 2015 10:03:24 -0400
Daurnimator <email@example.com> wrote:
> I think they were saying that you could write a metmethod that is not commutive:
I take your point about writing a random or otherwise noncommutative method, but
what Coda said was "in the case where __eq was defined on one and not the
The reason the difference matters to me is that someone who writes a random or
otherwise noncommutative method is (definitely) doing it to themselves. But at
least in previous versions of Lua, the language required basic safeguards by
requiring that both operands "share the same metamethod".
We have not been faced with the need to satisfy someone else's
requirements, and for this freedom we are grateful.
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System