4 ms·
Originally it was a Anglicization of "für" in German first used in a programming language called Superplan which was then picked up upon by FORTRAN and then it
by Fordec 7y ago
Originally it was a Anglicization of "für" in German first used in a programming language called Superplan which was then picked up upon by FORTRAN and then it just stuck
- eru 7y agoWell, that doesn't really solve the mystery. The German "für" doesn't have any closer connection with loops than English "for".
- kuschku 7y agoe.g. in Sums or Products, with $$ Σ_(i=0)^(20) x² $$ you'd actually pronounce that as "summe für i = 0 bis 20 von x²", which is a good argument for where it might be from.
- dukoid 7y agohttps://en.wikipedia.org/wiki/Heinz_Rutishauser https://en.wikipedia.org/wiki/Heinz_Rutishauser I don't think it's much more intuitive in German than in English, probably goes back to the "for each" quantor.
- bhaak 7y agoThe for loop is the most unintuitive variant of the possible looping constructs. The others (while do/do while/endless loop) are much more straightforward. We could easily have ended up with another version. I always read it as inspired by "for values of" which at least in German is a common phrase heard in mathematical courses.
- pletnes 7y agoFortran has «do» loops, no «for» loops (to my knowledge). do i = 1, N ...