|
On 2012-10-10 10:31 AM, "Roberto Ierusalimschy" <roberto@inf.puc-rio.br> wrote:
>
> > I see the error-handling in the relational metamethods have been changed.
> > In 5.1, applying relational operation on two objects with different types
> > causes error. In 5.2, it depends on the metamethods implementation. Should
> > this be covered in the "Incompatibility" section?
>
> We assume that programmers do not use erroneous code on purpose. So,
> turning erroneous code into valid code should not cause any
> incompatibility.
>
> -- Roberto
>
I'm not sure that's a good assumption as long as error handling methods exist. It's not uncommon to do something that might or might not work (operate on objects you know nothing about, attempt to load a module, etc) wrapped in a pcall to test whether it works.