ABSTRACT
Although the teaching of programming has evolved over 50 years, all methodologies rely on a simple structure that was born a long time ago: the loop, shared by all high-level programming languages, and the preferred choice for any repetitive task programmers face. We analyze here how “loops” skew the way programmers solve problems, and prevent them from taking advantage of the available parallel/distributed computing architectures. To do so, we state our initial hypothesis: eliminating loops will allow a more natural parallel programming approach. The idea is to mimic a common practice today that was established in the past for a different purpose: prohibiting goto statements to improve code maintainability. This paper describes a new computer programming teaching strategy that we tested for 7 years and provides evidence on how loop prohibition, in the context of Functional Programming, makes students aware of data dependencies and produces 21st-century programmers who benefit from widely available parallel architectures.
Acknowledgments
This publication is part of the Grant PID2020-115570GB-C21 funded by MCIN/AEI/10.13039/501100011033, and Grant GR21108 funded by Junta de Extremadura and the European Regional Development Fund, ”A way to build Europe”.
Disclosure statement
No potential conflict of interest was reported by the author(s).