re: Demystifying the Long Arrow "Operator" VIEW POST


That is just a bad idea.

There really is no such thing as a "Long arrow" operator.

The example of:

while (i --> 0) {

Is really just:

while (i-- > 0) {

The post decrement does not belong to the greater than sign, and implies entirely different things.


Exactly the point I tried to hit on. I purposefully added quotation marks around the word "operator" every time I used it in the context of the "long arrow operator" because of that.


But that is the problem. There is no such thing as a "long arrow operator", and you are just sowing confusion.

I see. I get your point. I wrote this article so that people would be aware of an unorthodox way of formatting their code, so that when they encounter them in the wild, they'd be prepared to tackle them.

Indeed, the entire point of this article is to demystify something that doesn't exist. It's great that you pointed this out, though.

Nah, keep it up. The confusion was sown long before that. I had a good laugh.

Oh. Thanks, man. Appreciate it! 👍


but you also called it analogous to a limit function. which is confusing and it's just not. limits in my mind are inclusive, infinite sequences, not integer-based, step-wise functions that forget their initial value.

That's true. I do catch your drift. I see where I might have caused some confusion there.

It isn't meant to equate the two ideas, though. One shouldn't get too worked up in it. It is just an analogy after all.

i think the issue is that it's a bad analogy. it draws parallels where there are none, and it creates a mind map that just doesn't match the terrain.

That's true. This isn't the first time I've made bad analogies. Guess I'm still learning how to play with my words in an interesting manner. I'll keep working on it.

Admittedly, though, I don't see the analogy I made as entirely wrong. There is still some truth to it. The notation does imply some sort of "approaching by decrementing" to an extent. Regardless of that, it's still a bad analogy, as you said, and I agree.

However, I won't edit the article because that's really how I thought about the notation at first. It would really be dishonest of me and to myself if I changed the analogy now. So for now, it shall serve as a reminder to me to be better with my analogies.

The notation does imply some sort of "approaching by decrementing"

i think the issue is that "approaching by decrementing" just isn't a limit. if you'd stumbled across a "approach through an infinite sequence" operation (maybe something that recursively takes smaller steps as it approaches a correct answer?), then i think you'd be on to something.

Code of Conduct Report abuse