4 ms·
One of the reasons they state is that ++ makes it harder for beginners. I just taught ++ and -- to 1st semester students last week. There were no problems.
by bphogan 11y ago
One of the reasons they state is that ++ makes it harder for beginners.
I just taught ++ and -- to 1st semester students last week. There were no problems.
- mayoff 11y agoTime that could have been spent teaching them something else useful, if your language didn't have ++ and --. Even if all features of your language are easy, teaching/learning each feature takes time.
- bphogan 11y agoMy point was that it's a poor reason for removing it from a language. Believe it or not the concept of x = 5 is harder to understand. They know that = means equality, because of algebra. I have to retrain prior knowledge, and since humans rely on prior knowledge to learn new things quickly, it's more difficult. Having to explain == or .eq or, god forbid, === takes way more time to explain than: "x = 0". x++ adds 1 to x. So when you need to increment by one, you can do x = x + 1, or you can do x++ which is a shorter way." Boom. Done. Not exactly a good reason for taking it out of a programming language. That's all I was saying. Do I care that Swift has it or not? Nope. But I just thought this particular reason was silly.