Using Functional Paradigms in an Imperative Language
1998 (English)Report (Refereed)
Undergraduate students are required to absorb knowledge about programming in a relatively short time frame before being required to apply that knowledge in different programming contexts. At the University of Karlstad, the usual progression is from imperative to object oriented languages. Less time is spent on introducing functional languages. This paper is a report on work in progress on taking ideas from the functional paradigm and applying them at an early stage to imperative language programming in an effort to improve the students' understanding of programming paradigms and facilitate an easier transition to functional programming languages.
Experience indicates that a high percentage of students find this transition difficult and that one of the main difficulties is a conceptual one - escaping from the "imperative mindset". In this project, a programming style is developed using functional ideas; minimising the number of local and non-local variables, passing functions as objects, using functions in data structures, and the students are asked to program in this style throughout one course using an imperative language. The students then go on to a further course where a functional language is introduced. After this course the students are interviewed to determine whether the ideas and programming style from the first course have helped to form a clearer conceptual model of both the imperative and functional paradigms.
Place, publisher, year, edition, pages
karlstad, Sweden: University of Karlstad , 1998.
Research subject Computer Science
IdentifiersURN: urn:nbn:se:kau:diva-25288OAI: oai:DiVA.org:kau-25288DiVA: diva2:599066