3 ms·
R have <- operator and a quick google search Python currently isn't using <-. So being pragmatic I would choose <- over ←.
by anthony_doan 7y ago
R have <- operator and a quick google search Python currently isn't using <-.
So being pragmatic I would choose <- over ←.
- kelnos 7y agoNot going to work: >>> x = -3 >>> if x <- 2: ... print 'yes' ... yes >>> x = 5 >>> if x <- 2: ... print 'yes' ... >>> Yes, those are ugly examples of bad use of whitespace, but making '<-' mean assignment would be a backwards-incompatible change. (In case it isn't clear, that evaluates as "if x is less than negative two".)
- m463 7y agoDidn't C have syntax holes like this? like c=+1 --> c = +1 or c =+ 1
- JoeAltmaier 7y agoOriginally, in version 0. It was quickly changed to c += 1 to fix that.