r/learnprogramming • • Apr 05 '22

Name one programming/comp sci concept you never understood and if you understand it, try to explain it to them

Name a programming concept such as virtual functions, pointers, certain algorithms, etc that you always had a hard time understanding and why.

Someone else who reads yours and does understand it, try to explain it to them to help them learn

1.6k Upvotes

738 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Apr 06 '22

Yeah I mean I think the very concept of iteration really fucks with people initially and putting that into a succinct piece of writing seems WEIRD to people. “So like this sentence is telling itself to do something until it tells itself to stop?!”

1

u/Fluffy-Lecture4408 Apr 06 '22

Actually classical loops as for loops keep repeating a set of instructions while a condition is true. As opposed to do until a condition is true. The main difference is that in a do until even if the condition is true at start, the loop will occur at least one time.