An Aside on Programming Languages

You write a program in a programming language. There are zillions of programming languages, and each one has its dedicated advocates who will insist that it is the greatest programming language in the universe. Which one should you learn? 

Every programming language has its strengths and weaknesses. In my life, I have learned a lot of programming languages: JOSH, ROSH, Fortran, BASIC, 6502 Assembly, Forth, 68000 Assembly, Pascal, C, C++, Java, and Javascript. Of these, the only ones that I would refuse to use today are Fortran, C, BASIC, and Pascal. Forth has a certain elegance in its weird stack-based approach; C++ is a solid object-oriented language. 6502 Assembly is tight and clean. 68000 Assembly is a bit looser, but still very clean. Java is messy but it solves display problems quite well. Javascript is simple and fun but works well only with small programs. 

You might be tempted to choose a “real” programming language, something that professional programmers use. Python is currently the most popular language with professionals, and it has many attractive features. Some people recommend Python as a good language for beginners, because its design allows you to start off with a small version of the language and then add new features as you need them. However, in my judgement, Python is not ideal for beginners. It’s like a Boeing 747 in which most of the instruments have been removed, leaving you with only basic instruments like the throttle, stick, brakes, and altimeter. To do anything useful or interesting with Python, you need to bring in some of those special libraries, pushing the total complexity up.

I will be using Javascript for this book. Now, Javascript can be messy, because it is most often used in conjunction with two other languages: HTML and CSS. This means that you have to learn HTML and CSS before you get started on Javascript. But it is possible to use Javascript without having to learn HTML and CSS. I’ll show you how to do this when we get going.