For the last ten years, my standard answer to the question “from which language to start familiarity with programming?” Was simple - Python. Now I am changing my recommendation. Python is still a good language. It allows you to focus on the task and not worry about architectural problems. About the things that experienced programmers consider important, forgetting what it is like to be an absolute beginner. The language itself dissolves in the background, and instead of explaining the possibilities and philosophies, the lessons are devoted to generating musical scale, calculating distances at the stadium depending on the treadmill, or writing an automatic poker player or a
yatza .
And then one day the student will ask an innocent question: “How can you make the poker simulator not in the command line, but in the window, with the button for issuing the following cards?”
It is difficult to describe the complexity of this issue. It forces to consider various GUI-tools for Python. It turns out that
Guido does the same thing every couple of years: wonders if TkInter is the right choice for IDLE, the standard Python IDE. But for now this is TkInter.
After a week - a new question: "How to write a simple game with graphics?"
')
It's time to explore the options again. Pyglet looks promising, but it has not been updated since July 2012. There are libraries that focus on something specific and do not try to do everything, for example, SplatGL, but it is quite new and difficult to find a sufficient number of examples. PyGame seems to be popular, there is even a book, so OK, let's learn how to use PyGame.
A month later, new questions: “How can I share my game with a friend? Although ... is it possible to download this game on the phone to show everyone that they don’t need to install anything? ”
Um ...
All these questions made me abandon Python as a language for learning. Of course, there will always be those who consider only the old school path to be correct - files with script scripts that generate monochrome text output in the terminal - but you need to understand the level of isolation that accompanies this choice. This is often not what people want to do. Yes, you can find add-ons for almost everything, but which of them went through the sweat and swearing of serious projects? Which are well maintained today, but will be forgotten tomorrow?
The growing popularity of non-desktops complicates things, yes. I studied Erlang to get away from C and C ++ and change my level of thinking. I proved that I can use Erlang and a purely functional approach in the area that is most of all afraid of: games. And then came iPhone and everything. Erlang has no more space.
It is because of these thoughts and experiences that I now recommend JavaScript as a language for learning. I know, I know, it is quaint and sometimes just strange, but in general it is a normal and fairly modern language. Most importantly, he works on an unprecedented, ubiquitous cross-platform system for markup, typography and rendering. Do you want to show interface elements, images or text? Use HTML directly. Do you want graphics and animation? Use canvas.
I look forward to the reaction of many to such a change in thinking: horror and fear. These reactions should not be related to JavaScript flaws. They should be related to the fact that I ignored a bunch of other languages, regardless of their capabilities, typing systems or syntax, simply because they do not have native support in web browsers.