Am I evil for this?
Araq
rumpf_a at web.de
Thu Oct 13 21:01:08 UTC 2022
On Thursday, 13 October 2022 at 20:28:52 UTC, solidstate1991
wrote:
> So I watched this video:
>
> https://youtu.be/G6b62HmsO6M
>
> And Walter talked about using operator overloading for
> nonstandard purposes.
>
> So in my collections library, I used it to implement set
> operators, but since set operators don't exist in the D
> standard (and require unicode, which would upset a lot of
> people, especially those who don't know what Win + '.' does), I
> had to use operators that have similar function in other spaces.
>
> I personally haven't used them yet in my projects (except for
> the unittests), so it's not too late to remove them, but I
> don't know if anyone else might be using them or not.
>
> Link to my library with an example offense:
> https://github.com/ZILtoid1991/collections-d/blob/master/source/collections/treemap.d#L356
Before C came along x << y already meant "x is much smaller than
y" and x || y sometimes meant "run x and y in parallel".
"Nonstandard purposes" hardly means anything. Use the operators
as you see fit.
More information about the Digitalmars-d
mailing list