
A recent
translation of the article “It's time to replace Python as a language for learning” provoked a lot of discussion. Obviously, programmers consider this topic very important. Unfortunately, most disputes were about imperative languages, and few offered functional languages as a tool for learning programming.
We in Hekslet recently launched a
new version , the key feature of which was the practical programming exercises in the browser. In this regard, we began to receive even more letters from novice programmers with questions like "where to start". On the one hand, they want to post the beta version of the application in the app store in a week. On the other hand, we understand that in such a short time, you can probably learn how to code applications, but you cannot learn how to program. And it’s hard to decide which is better: to teach how to create simple applications as quickly as possible without a real understanding of programming, algorithms and their computational complexity, and then begin to get familiar with these important topics, or start “from the beginning,” and organically come to the creation of applications and products mastering the foundation.
')
In 2001,
Edsger Dijkstra wrote a letter to the University of Texas Economic Council. In it, the famous scientist encourages board members to think about changing the programming language for the introductory course. Unfortunately, the language has
been replaced by Java. At about the same time, MIT changed the language of the course “Structure and Interpretation of Computer Programs” from functional Scheme (LISP dialect) to Python.
Today we publish the translation of this letter.
Members of the Economic Council
I’m writing to you about hearing about replacing a language in an introductory programming course from the Haskell functional language to an imperative Java language. I believe that the Council must take responsibility so that the decision is not taken at the wrong level.
You see, this is not a small detail. Colleagues from other states (still!) Do not understand how I can survive in a place like Austin, Texas, automatically assuming that conservative Texas means mediocrity. I usually reply “Do not worry. The computer science department is a fairly enlightened place, for example, in an introductory programming course we introduce students to Haskell. ” At first they do not believe, and then they begin to envy. It usually turns out that their curriculum has not yet come from the transition from Pascal to something like C ++ or Java.
A good reason for choosing a functional programming language in the course for beginners is that most students are a little familiar with imperative programming. After seeing the novelty of functional programming, they understand that programming is broader than they thought. And students quite quickly notice the elegance of the functional approach for solutions that are very difficult (or impossible) to formulate with tools familiar to them from school.
The fundamental reasons for choosing are that functional programs are closer to mathematical objects than imperative ones, so it is easier to explain what strict reasoning is made when programming. An additional advantage of functional lazy-programming programming is that it provides an environment that provokes practical reasoning.
Finally, comparing Haskell and Java specifically, I want to say that Haskell, although not perfect, is much better in quality than disorderly Java (which required a wide advertising campaign and aggressive sales people to become a commercially acceptable product). It is so bad that the whole industry accepts low-quality design as a de facto standard. Personally, I think that a university should leave a healthier alternative afloat.
Not only the cello influences the musician, we are all influenced by the tools we have learned to work with, and in this respect, programming is even more cunning: it shapes our thinking process. This fact makes the choice of the first programming language so important.
I would like to use an introductory programming course to create a culture that would be the foundation for the whole educational process. And so that learning does not begin with attempts to forget or unlearn something (if this is at all possible: what has become our past will remain forever). The choice implies a serious responsibility to our students, so it cannot be left on the conscience of the random chairman of something. It must be made by the Economic Council. This issue can not solve the officials or politicians. Here we need statesmen.
