I know people have their own preferences to format if-else chains, and I respect others' preferences, but come on now, be real.

youtu.be/BClS40yzssA?t=3672

#cpp #cplusplus #teaching #programming

If teaching loops in a C-like programming language, which statement would you teach first: while loop or for loop?

youtu.be/BClS40yzssA?t=3940

#cpp #cplusplus #teaching #programming

@smurthys Nowadays, for loop, but (if at all possible) start with the `for (auto& x : collection)` form and teach the `for (base case, check case, increment step)` form as a special case. Get people in the mindset that the first one is preferable if available, and the other is usable when needed.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.