|
|
|
|
|
by warmwaffles
3698 days ago
|
|
++i and i++ have their uses. Just because it is confusing to you doesn't mean it is confusing to others. There are things about swift that are confusing to me, but I don't out right say that it has to go. Chalk this one up to shit hacker news says. |
|
Things that require a double take to read and parse do not help. Additional solutions to the same problem do not help.
There's a lot of cleverness that can come up in programming that may make for neat/short writing but that makes reading and purpose less clear. i++/++i helps with that with no special benefits.
I like how the Swift team approached the decision to remove them: thinking on whether it would make sense to add them had they not been there. And it doesn't, as they solve no particular problem; they're just a special, (not much) shorter solution to something that's already solved.