News for hackers. Stuff that matters.
Re:Misconceptions about loops in C by rainsford on Thursday June 27, 2024 @07:54PM (#40816461)
I suppose the order your introduce those examples in ultimately comes down to whether it's more important for the student to first understand what the computer is doing or how it is doing it.

Most people don't start out thinking like computers, so I think it's probably more important for a new student to understand how code describes a particular series of operations and then help them translate that into how a computer "thinks" about those operations.

Re:Misconceptions about loops in C by userbinator on Friday June 28, 2024 @12:06AM (#40817603)
Most people don't start out thinking like computers

Everyone who has followed a sequential list of instructions would strongly disagree.

Re:Misconceptions about loops in C by saurik on Tuesday July 09, 2024 @12:34PM (#40918039)
Which, FWIW, are almost never written using recursion: they are written with either imperative loops or the moral equivalent of a goto statement.