Open brandtbucher opened 4 years ago
Yes. I think to recall that we already mentioned somewhere that we need to allow +
in complex values, but I cannot find it anymore. +
and -
should both be legal in order to form numeric literals.
Cool. This will realistically include binary -
as well, to allow each of:
1+2j
1-2j
-1+2j
-1-2j
Yes, exactly. -- --Guido (mobile)
Sorry for reraising this, but are there actual use cases for these? In general equality matching with floats and complex are problematic (and the values you'd likely want liko 0, 1, 1j, do not require binary ops). Removing this could simplify a bit
Not worth the ink.
We already allow a single unary
-
for negation of numbers. Should we also allow binary+
if the LHS is real and the RHS is imaginary, so patterns like1+2j
are possible?I think yes.