this post was submitted on 04 Oct 2021
0 points (NaN% liked)
Programmer Humor
32042 readers
1229 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
While it is practical and works, it is not an operator by itself. It a combination of two, the unary decrementation and greater than comparator.
Read it as
i-- > value
.Honestly, I'm not sure which I think is worse. Having an explicit down-to operator or being able to combine operators in a way that confuses experienced programmers.
This kind of combined operators are quite common in the competitive programming world, where the speed of coding is more important than readable.
Yeah, still horrid for real-world programming, though, where readability is ten times as important as how quickly you can type it out.
I'd argue the problem here is more the unary (in/de)crement operator. It isn't really necessary and most of the time it doesn't make stuff more readable.