As classical educational programming language are widely known Haskel, LISP and nowadays Java and Python. The are introduced in computer courses to the student, and everybody know, that this learning environment is artificial. That means, Haskel is not used in the industry for real projects, it is only educated on the campus.
With a bit search on Google Scholar there are some interesting alternatives to this idea. C++ is partly used as a teaching language. The surprising precondition is, that C++ is apart from the above mentioned languages a practical programming language. That means, it is discussed on Stackoverflow and many real life projects are done with it. According to the papers, it is possible to use C++ for more than only to write software. It can be used as an educational programming language. :That means, the aim is not to program software with it, instead the aim is to explain beginners how they can learn to write software.
The challenge is how to fit the complex C++ language into a teaching experience. The problem is, that most programming courses are not longer than 5 months, and in this time the student should learn the language. The usual approach is to teach not only C++ but together with the object oriented paradigm which separates the world in classes. I’m in doubt if this will work, because OOP is one of the most complex programming techniques ever invented. Most books about the topic are hard to understand, so my advice is to use C++ for teachihg procedural programming only. That means, to strip down the language into a smaller one and leave out the details. Is it possible to write simple procedural programs with G++ and clang++? Yes, it is very pleasant. The only what the beginner has to do is not using the class or template statement. Instead he programs in C++ like in C. That means his program consists of some functions, and a main function and perhaps a struct as a global variable. It is even possible to write a graphical application with that setup …
From the perspective of a computercourse it might be hard to accept that leaving out the object oriented paradigma is a good idea. Because without any class, it is not possible to write larger programs, and perhaps the students will not have understand what C++ is. On the other hand is the difference between procedural programming and OOP not as big, as some books are explaining. In reality, there is not a real difference. The reason is, that a procedural programs works in a linear fashion, that the first command in main() is executed, and then the second, while the OOP paradigm works in the same way. The only difference is, that in OOP the structs are more powerful. But ignoring this is not a real problem. If someone needs really OOP, he can extend a given struct easily to a class. It is mainly a question of the correct typo.
What we see in literature today is, that the programming language are separated into two groups. On the one side, we have classical educational languages like Forth, Pascal and LISP. While on the other side we see industry standards like C++ and PHP. The difference is, that C++ and PHP are usually evaluated with their ability to program large applications in real life and their raw performance, while teaching languages like Pascal and Forth are classified to their value in a computer programming course. I think it is time to change the criteria a bit. A first it makes sense to say that Pascal is a poor choice as a real programming language because it is very slow while on the other hand, C++ is a good choice as a teaching language, because it is supporting the learning experience of the beginner. I would go a step further and call C++ the ideal combination between a practical language for writing real software and a subject for programming courses. I do not think, that the language is too complex or bad documented. There are a lot of papers out there which explain how to use it in a learning environment. The success has to do with the right curriculum, a good teacher and interesting projects.
On the other hand, the performance of C++ is heavily overrated. It is true, that the language is the fastest programming language with the ability to program even on assembly level. But this advantage has not the top priority in the teaching situation. It is the same, if the beginner can run a program in 10 seconds or in 60 seconds. And i would go a step further and recommend to use as default the sleep command inside C++ to reduce the execution speed, so that the learner can see slowly how the for-loop is counting upwards.
In the Windows environment the “sleep” command is available while in SFML an equal command is available. The idea behind is, to not using the complete power of the language or the hardware, but to drive the system in a beginner mode for understanding better what loops are and how the if statement works. The sleep statement makes C++ more predictable. The language is transformed into a cute snail which is easy to handle.