Define a new custom operator in D Language.

IchorDev zxinsworld at gmail.com
Sun Oct 8 09:40:58 UTC 2023


On Monday, 2 October 2023 at 21:37:56 UTC, bachmeier wrote:
> On Monday, 2 October 2023 at 19:28:32 UTC, BoQsc wrote:
>> I'm unable to see how the operator overloading would allow to 
>> define a new custom  operator.
>
> And I don't expect that to change. This has come up many times.

With a parameter that has a symbol-like name you can use it like 
`x.mod(y)`, which looks alright too.


More information about the Digitalmars-d-learn mailing list