Skip to main content Accessibility help
×
Home
Hostname: page-component-55597f9d44-n4bck Total loading time: 0.237 Render date: 2022-08-12T16:27:33.365Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "useRatesEcommerce": false, "useNewApi": true } hasContentIssue true

How to design co-programs

Published online by Cambridge University Press:  02 July 2021

JEREMY GIBBONS*
Affiliation:
Department of Computer Science, University of Oxford, Oxford, UK (e-mail: jeremy.gibbons@cs.ox.ac.uk)
Rights & Permissions[Opens in a new window]

Abstract

HTML view is not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

The observation that program structure follows data structure is a key lesson in introductory programming: good hints for possible program designs can be found by considering the structure of the data concerned. In particular, this lesson is a core message of the influential textbook “How to Design Programs” by Felleisen, Findler, Flatt, and Krishnamurthi. However, that book discusses using only the structure of input data for guiding program design, typically leading towards structurally recursive programs. We argue that novice programmers should also be taught to consider the structure of output data, leading them also towards structurally corecursive programs.

Type
Education Matters
Copyright
© The Author(s) 2021. Published by Cambridge University Press

References

Bird, R. & Gibbons, J. (2003) Arithmetic coding with folds and unfolds. In Advanced Functional Programming 4, Jeuring, J. & Peyton Jones, S. (eds). Lecture Notes in Computer Science, vol. 2638. Springer-Verlag, pp. 126.CrossRefGoogle Scholar
Bloch, S., Clements, J., Felleisen, M., Findler, R., Fisler, K., Flatt, M., Proulx, V. & Krishnamurthi, S. (1995–2007) TeachScheme! https://teach-scheme.org/ Google Scholar
Bloch, S., Clements, J., Felleisen, M., Findler, R., Fisler, K., Flatt, M., Proulx, V. & Krishnamurthi, S. (2009–2012) Program by Design. https://programbydesign.org/ Google Scholar
Brooks, F. P. Jr (1975) The Mythical Man-Month: Essays on Software Engineering. Addison-Wesley.CrossRefGoogle Scholar
Felleisen, M., Findler, R. B., Flatt, M. & Krishnamurthi, S. (2001) How to Design Programs, 1st edn. MIT Press. https://htdp.org/2003-09-26/Book/ Google Scholar
Felleisen, M., Findler, R. B., Flatt, M. & Krishnamurthi, S. (2004) The structure and interpretation of the computer science curriculum. J. Funct. Program. 14(4), 365378.CrossRefGoogle Scholar
Felleisen, M., Findler, R. B., Flatt, M. & Krishnamurthi, S. (2018) How to Design Programs, 2nd edn. MIT Press. https://htdp.org/2018-01-06/Book/ Google Scholar
Gibbons, J. (2007) Metamorphisms: Streaming representation-changers. Science of Computer Programming 65(2), 108139.CrossRefGoogle Scholar
Gibbons, J. (2019) Coding with asymmetric numeral systems. In Mathematics of Program Construction, Hutton, G. (ed), Lecture Notes in Computer Science, vol. 11825. Springer-Verlag, pp. 444465.CrossRefGoogle Scholar
Hoare, C. A. R. (1972) Notes on data structuring. In Structured Programming, Dahl, O.-J., Dijkstra, E. W. & Hoare, C. A. R. (eds). APIC Studies in Data Processing. Academic Press, pp. 83174.Google Scholar
Jackson, M. A. (1975) Principles of Program Design. Academic Press.Google Scholar
Jackson, M. A. (2002) JSP in perspective. In Software Pioneers: Contributions to Software Engineering, Broy, M. & Denert, E. (eds). Springer-Verlag, pp. 480–493. Available at: http://mcs.open.ac.uk/mj665/JSPPers1.pdf Google Scholar
Meijer, E., Fokkinga, M. & Paterson, R. (1991) Functional programming with bananas, lenses, envelopes and barbed wire. In Functional Programming Languages and Computer Architecture, Hughes, J. (ed), Lecture Notes in Computer Science, vol. 523. Springer-Verlag, pp. 124144.CrossRefGoogle Scholar
Ramsey, N. (2014) On teaching “How to Design Programs”: Observations from a newcomer. In International Conference on Functional Programming. Association for Computing Machinery, p. 153166.CrossRefGoogle Scholar
Raymond, E. S. (1999) The Cathedral and the Bazaar. O’Reilly Media.CrossRefGoogle Scholar
Swierstra, D. & de Moor, O. (1993) Virtual data structures. IFIP TC2/WG2.1 State-of-the-Art Report on Formal Program Development, Möller, B., Partsch, H. and Schuman, S. (eds), Lecture Notes in Computer Science, vol. 755. Springer-Verlag, pp. 355371.CrossRefGoogle Scholar
Wadler, P. (1990) Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science 73, 231248.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.
You have Access

Save article to Kindle

To save this article to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

How to design co-programs
Available formats
×

Save article to Dropbox

To save this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

How to design co-programs
Available formats
×

Save article to Google Drive

To save this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

How to design co-programs
Available formats
×
×

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *