3 ms·
Assembler is great too, but not all languages have to be assembler. The modern looping construct imposes order not by design, but by historical accident. Worki
by jacques_chester 13y ago
Assembler is great too, but not all languages have to be assembler.
The modern looping construct imposes order not by design, but by historical accident. Working with a collection of data in assembler works by proceeding through memory addresses in linear order and then jumping back to the top. That pattern got lifted into higher level languages via the DO loop in Fortran.
It's an example of path dependency. Why do we assume that loops are the only natural way to deal with collections? Because that's just how the path of history unfolded. I think the die was cast when it turned out to be easier to build Turing machines than lambda calculators.
Edit: I don't know who downvoted you, but I hope it was an accident.