CIS 554 What This Course is About
Fall 2016, David Matuszek

The Sapir-Whorf hypothesis

The Sapir-Whorf hypothesis: A theory developed by Edward Sapir and Benjamin Lee Whorf that states that the structure of a language determines or greatly influences the modes of thought and behavior characteristic of the culture in which it is spoken. (Wikipedia)

Fortran was one of the earliest programming languages. There is an old saying that "You can write a Fortran program in any language." What this means is: With some ingenuity, you can force the new language to accept programs written in style of Fortran, ignoring the newer and often radically better approaches available in later languages.

Interestingly, Wikipedia says that " In a 2003 presentation at an open source convention, Yukihiro Matsumoto, creator of the programming language Ruby, said that one of his inspirations for developing the language was the science fiction novel Babel-17, based on the Sapir–Whorf Hypothesis."

Some paradigms

The following summary of language paradigms is oversimplified, but should give some idea of what constitutes a "paradigm."

The goals of this course

Every programming language has it's own "genius," it's own preferred way of thinking about problems. The "mainstream" languages--Java, C, C++, Objective-C, C#, and (to some extent) Python--are mostly very similar in their approaches. Sure, there are some differences. For example, one would never consider incrementing a pointer in Java. However, all these languages are firmly based in algorithmic thinking.

This isn't the only way to program.

Prolog and Lisp have no built-in loops (although you can "hack" them), because they aren't needed. Scala has an actual "while" loop, but it also has a "for" loop that, when examined closely, really isn't a loop. Haskell has no loops at all. These are not deficiencies, because the named languages have features of equal or greater usefulness. The trick is to learn to "think in the language," rather than thinking in C (or Fortran) and trying to force the language to behave like C.

I believe the best way to learn concepts is to use them, and the best way to use new programming concepts is by writing programs in the languages that support and encourage those concepts. Later, those concepts can be carried over into more conventional languages, once they have become a part of the programmer's "mental toolkit."

The primary goals of this course are to teach you new ways to think about programming, additional tools to use in conventional programming, and to give you the confidence to tackle new languages and systems. Along the way, I think you will become a better programmer.

Language Selection

 I have tried to choose, among the languages I am at least somewhat familiar with, those that best serve as examples of the concepts I wish to convey. This means not only that the features in question are well supported, but also that the syntax is simple enough to pick up quickly. (In one or two cases, the syntax itself involves new concepts.) These criteria rule out the most popular languages, which are all mainly algorithmic and object oriented. Consequently the languages chosen are not "mainstream," and you will probably never use them outside of class. You will, however, encounter the concepts again and again.

One partial exception is the Scala language. Scala is a competitor to Java that is designed from the ground up to incorporate both object-oriented and functional programming concepts. All modern languages are gradually incorporating functional concepts; even Java 8 tries to fit them into the existing language. But Scala is, in my opinion, just a much better language.

Finally, reactive programming is becoming more and more important. Last year I used Elm to illustrate reactive programming, but since then Elm has changed direction. I have considered both Scala and JavaScript extension for this purpose, but both seem to me to make reactivity both complicated and difficult. I am still looking for the best vehicle for reactive programming.