Martin Nowak is officially MIA

user1234 user1234 at 12.fr
Sat Mar 29 00:29:27 UTC 2025


On Friday, 28 March 2025 at 23:07:24 UTC, Timon Gehr wrote:
> On 3/28/25 23:51, user1234 wrote:
>> On Thursday, 27 March 2025 at 22:04:53 UTC, sfp wrote:
>>>
>>> I'd like to understand what impediment there is to having 
>>> "free" operator overloading.
>> 
>> 1/ A random public import in an dependency chain you dont 
>> master may unexpectedly change the expected behavior. Think to 
>> what's defined in a DUB package for example.
>> ...
>
> The situation is the same as with any UFCS call...

I dont see how UFCS can break my Int24 that defines opBinary!"+".

However I think you get the idea, that it not break the semantics 
of certains operators, especially for built-in types.

>
>> 2/ Costly for a compiler. The compiler needs in each scope to 
>> have a list of opovers.
>
> No, it does not have to do that.

I admit that there are maybe other ways to do that. I thought to 
lists or maps initially.




More information about the Digitalmars-d mailing list