DEV Community

Discussion on: Demystifying the Long Arrow "Operator"

Collapse
 
dimpiax profile image
Dmytro Pylypenko

Nowadays decrement and increment are bad practice. Consequently operator "long arrow" will be disappeared, and it's good.

Thread Thread
 
cecilelebleu profile image
Cécile Lebleu

If you don’t mind me asking, why are decrement and increment considered bad practice? They seem relatively simple and straightforward.

Thread Thread
 
somedood profile image
Basti Ortiz

Honestly, I don't consider it bad practice myself. I agree with your sentiment. It's just that it's only bad practice in the context of the "long arrow operator".

I'll let others answer your original question for you. I'm sure it has turned up in one of the discussions at some point.

Thread Thread
 
dimpiax profile image
Dmytro Pylypenko

In whole context,

  1. It has some bad relation with compiler optimizations. Don’t know what we have nowadays.
  2. It’s not good for abstraction. I.e.: ‘value += iterateAmount’.