Hacker News new | ask | show | jobs
by lanestp 3697 days ago
I gotta disagree with this one. Those operators have always been confusing and unnecessary. j = i++ being different from j = ++i alone is enough to convince me it's gotta go.
2 comments

Exactly. I am disappointed they're removing function currying/partial application syntax though :(
This was my first reaction as well, but then I realized I hadn't done much currying in Swift and half forgot it was a feature.

Maybe you can bring it back when we get hygienic macros (Swift 4.0? fingers crossed)

The currying was cool. I had to read the pull requests on that one and it seems that it was removed because it complicated language development. I'm hoping they bring it back in a modified more extensible way!
++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.

I believe something can be easy to understand (as is i++/++i) but also confusing.

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.

Too easy to get errors for array or objects loop outside the boundary that can be confusing for any teams dealing with large scale and when the requirements change frequently.