What's the rationale of removing the `++` & `--` prefix/postfix operators from a programming language?
-
-
Replying to @ArvidGerstmann
Why do they exist in the first place? Because they once corresponded to pre and post-increment addressing modes that some CISC processors had?
2 replies 0 retweets 3 likes -
Replying to @rep_stosq_void @ArvidGerstmann
Each programming language can choose its own destiny, but some people like those that offer a small set of orthogonal features. Examined under this angle, ++ bring nothing to the table.
1 reply 0 retweets 2 likes -
Replying to @rep_stosq_void
Why has
@rustlang omitted them, then, for example? Rust is everything but a language with a small set of orthogonal features. It's a behemoth of a language, edging, if not exceeding, C++ in complexity. Because it's just a shorthand for `i += 1`?3 replies 0 retweets 1 like -
Replying to @ArvidGerstmann @rustlang
Also, there is really no equivalent of `i++`. In GNU C: `int j = ({ int _t = i; i += 1; i; })` In C++: `int j = [&](){int _t = i; i += 1; return i;}()` That's clumsy, and probably even more error prone.
2 replies 0 retweets 1 like
You might have just proven your own point re error prone: I think you intended to return `_t`, not `i`. ;)
-
-
Ahhh. Crap. You're right.
0 replies 0 retweets 3 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.