Re: [VOTE] Userspace operator overloading

This is only part of a thread. view whole thread
March 24, 2020 11:14 (Mark Randall)
On 23/03/2020 17:58, wrote:
> I have opened voting on >, which allows users > to overload operators in their own classes.
I am certainly not opposed to operator overloading, and would like to see it in the language. However, I'll be voting no because of a couple of implementation points: 1. I feel like the choice of NULL as the return type for not implemented is far from ideal, especially for 8.0 which provides for union type hints. 2. The error handling behaviour is too timid. If operator overloading is to become a first-class feature, error handling should reflect as such and any attempt to use objects without the appropriate handlers being installed really should result in an error being thrown just as it would be if an undefined method was called. Mark Randall