Break statement considered


T his article reflects on the instructional design of introductory programming courses (CS1) and promotes awareness of several related threads of research, including work on looping constructs, program composition, natural programming, and abstraction. We eavesdrop on a conversation between two imaginary computing educators, Walter White and Tom " Duke " Martin, who revisit the venerable debate on loop exits. They begin with a discussion of the break statement but soon find themselves broaching several broader themes, as the use of break is associated with a particular style of composing programs which can impact on student learning in subtle ways. Eventually, despite their differences, Walter and Duke are able to identify several points of agreement, pertinent trade-offs related to instructional practice, and open questions. DUKE MARTIN (DM): Okay, Walt, but that's ancient history! Yes, Dijkstra [7] criticized go to and Pascal didn't have break because Wirth [33] agreed. But Knuth [17] showed already in the seventies that you can use go to sensibly, and nowadays we've got break and continue and exceptions, which neatly handle many of those cases that Knuth wrote about. You know all that. How is this still a thing? WALTER WHITE (WW): The debate is old but it may be less dead than you think. Have you looked this up on the net recently? DM: [Browses StackOverflow, Quora, etc.] Well, well. There are still some people who advise against all use of break, and people whose employers don't allow them to use break, and— WW: And you'll have found out by now that we who object to break are being called out as obvious academics, managers, or some other kind of idiots.

DOI: 10.1145/2950065

Extracted Key Phrases

Cite this paper

@article{Sorva2016BreakSC, title={Break statement considered}, author={Juha Sorva and Arto Vihavainen}, journal={Inroads}, year={2016}, volume={7}, pages={36-41} }