On Tuesday, 23 June 2015 at 16:33:29 UTC, Dominikus Dittes
Scherkl wrote:
On Wednesday, 17 June 2015 at 09:28:00 UTC, Tofu Ninja wrote:
I actually thought about it more, and D does have a bunch of
binary operators that no ones uses. You can make all sorts of
weird operators like +*, *~, +++, ---, *--, /++, ~~, ~-, -~,
>>>--, &++, ^^+, in++, |-, %~, ect...
+* is a specially bad idea, as I would read that as "a + (*b)",
which is quite usual in C.
But in general very cool. I love ~~ and |- the most :-)
Yeah |- does seem like an interesting one, not sure what it would
mean though, I get the impression it's a wall or something. Also
you can basicly combine any binOp and any number of unaryOps to
create an arbitrary number of custom binOps. ~+*+*+*+ could be
valid! You could probably make something like brainfuck in D's
unary operators.