Course description

CIS 5xx Programming Paradigms

Prerequisite: CIS 121 or CIT 594 or equivalent.
Achieving mastery in a new programming language requires more than just learning a new syntax; rather, different languages support different ways to think about solving problems. Not all programming languages are inherently procedural or object-oriented. The intent of this course is to provide the student with a basic understanding of a wide variety of programming paradigms, such as logic programming, functional programming, concurrent programming, rule-based programming, and others.

Rationale for course

Java isn't forever.

We do our students a disservice if we teach them to program only in Java and similar languages [1]. Learning to program in Java, C, C++, and C# means learning to understand and use procedural and object-oriented concepts and techniques. However, there are important concepts that are lacking from these languages or, at best, present in an awkward and uninviting way. In Java, these include:

For many of our students, the concepts of actors, closures, constraints, coroutines, currying, macros, pattern matching, rule bases, and similar non-C-like concepts and ideas are completely unfamiliar, and they are in a poor position to learn and make use of languages and systems that embody these concepts.

Now that we have "fallen off" Moore's Law [2], dual-core and multi-core computers are becoming increasingly common, yet we continue to teach single-threaded programming, with multithreading seen as an advanced topic. This approach is not viable for very much longer [3].

There are modern languages that relieve the programmer of much of the burden of coordinating multiple threads, by emphasizing functional programming and by the use of STM, Software Transactional Memory [4]. Among these languages are:

Regular expressions are mentioned above because they are a ubiquituous "sub-language" of virtually every programming language, yet are awkwardly implemented in Java and other C-like languages. They are at their most convenient in Perl and Ruby, and at least moderately supported in most modern languages.

Other languages, embodying very different models of computation, include:

The purpose of the proposed course is to widen the students' horizons beyond conventional O-O and procedural languages, and give them some understanding of alternative paradigms [10], so that they may more quickly and easily adapt to whatever future languages may have in store for them. Such a course would be particularly suitable for Masters students.

Notes

[1] 2008 SIGPLAN Programming Language Curriculum Workshop Report [PDF], http://tinyurl.com/qzna46

[2] The End of Moore's Law, Adam L. Penenberg, http://www.slate.com/id/2132826/

[3] The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software, Herb Sutter, http://www.gotw.ca/publications/concurrency-ddj.htm

[4] Beautiful Concurrency [PDF], Simon Peyton Jones, http://research.microsoft.com/Users/simonpj/papers/stm/beautiful.pdf

[5] Programming Clojure [book], Stuart Halloway

[6] The Future: Part One, Charles Nutter, http://blog.headius.com/2009/04/future-part-one.html

[7] Prolog's Heir Apparent: Declarative Programming in Scala [reference only], Suresh Velagapudi, http://www.meetup.com/New-York-Scala-Enthusiasts/calendar/10447498/

[8] Prolog [Wikipedia article], http://en.wikipedia.org/wiki/Prolog

[9] Jess, the Rule Engine for the Java Platform, Ernest Friedman-Hill, http://www.jessrules.com/

[10] The Principal Programming Paradigms [PDF], http://www.info.ucl.ac.be/people/PVR/paradigmsDIAGRAMeng101.pdf