https://issues.dlang.org/show_bug.cgi?id=24842
--- Comment #7 from Mai Lapyst <[email protected]> --- > Yes, that would be desirable, but it's much harder to enforce, as it is not > easy to detect if something is "numeric" or not. At least D has the "~" > operator, so that is no more necessary to convolute addition and > concatenation. Sure it easy, after all, dlang has both the `std.traits.isNumeric` and `std.traits.isScalar` templates that can detect numerical / scalar values, which would be the only types one would expect `+` to work on anyway. > If you need to "negate" some object, why not overload the unary operator "-" > or "~"? > ... > If your usecase is only that you like to write "!" instead of something else > ... My usecase is that i find writing `-` (which is an arithmetic inverse) and `~` (which is both an bit-wise inverse AND an concatination in dlang), much more confusing to read when an boolish, logical negation is that what is wanted & being done in-code. I would also argue that it's more commonly understood that `!` means logical, boolish inverse across languages. --
