3 ms·
I went to a little school in the CSU system in the 80s, but at least one of our professors used the term "loop invariant" (as well as induction) in our freshman
by Roboprog 12y ago
I went to a little school in the CSU system in the 80s, but at least one of our professors used the term "loop invariant" (as well as induction) in our freshman "Pascal" class.
I admit I liked the recursive version of the author's example better, though, especially when he gets into "oldr" and "newr" to track the mutated state of things in each loop pass.
Along a similar line, I remember reading on my own about Eiffel and "class invariants" in the very early 90s.
Then came the internet gold rush to dumb things down, though. Now, we have King Java and its idiotic "bean" anti-pattern. Just make a useless crap object, whack on it enough (mutate it) until you hope it's in a useful state and slog onward! State of the art brain damage :-(