FUNCTIONAL PROGRAMMING IN C++14

Authors

  • Austin Owino Wetoyi

DOI:

https://doi.org/10.15520/ajcsit.v6i1.39

Abstract

Although all programmers familiar with the C++ computer programming language will unanimously agree that the language is a multi-paradigm language, not many are aware that it sufficiently supports writing programs in the functional style or logic style.

One of the tragic consequences of lack of this knowledge is that there are few computer programming lecturers in our universities who can teach functional programming. A typical programming lecturer (familiar with C++) assumes that to teach functional programming, one must learn a language specifically designed for functional programming (such as ML and Haskell) and very few are ever eager to learn a new language from scratch. This may explain why most of our universities don’t have functional programming in their curriculum or if it is there, then it is an elective course that is rarely if ever taught.

In this paper, I highlight C++ language’s support for the functional programming style. I explore some functional programming concepts and illustrate how each can be accomplished in C++. It is my hope that this paper will bring back this beautiful paradigm into our universities’ curricula. I also hope that those who use the other paradigms of C++ for example in software development will realize that they can also write most of the code using the functional style.

Article Metrics Graph

Author Biography

Austin Owino Wetoyi

Vrije Universiteit, Faculty of Science and Bio-Engineering Sciences, Department of Computer Science, Brussels, Belgium

Downloads

Published

2016-04-10