I have recently been distracted by the discovery that, apparently, Python has overtaken French as the most popular "language" taught in primary schools.
It is described, variously, as "an easy language to learn, simple to use, concise, expressive, highly productive and popular because it is easily understood by humans."
Given my interest in learning how to program and that it is pre-installed in a Raspberry pi400, I thought I would make an effort to write a Python program so as to be able to compare it to SMSQE BASIC.
I have spent, at various times, five days trying to do this with the help of Youtube videos. The Pi Beginner’s guide is no help whatsoever if one wants to write an .ex program. Clearly I am not human enough.
In an online Python guide starting with the title "whetting your appetite" one rapidly finds the following paragraph:-
“Execution of a derived class definition proceeds the same as for a base class. When the class object is constructed, the base class is remembered. This is used for resolving attribute references: if a requested attribute is not found in the class, the search proceeds to look in the base class. This rule is applied recursively if the base class itself is derived from some other class.”
I would love watch a video of a teacher trying to explain this to a classroom of disinterested students.
I learned more about writing a computer program by reading Dilwyn’s ancient online QL guides, than by reading the Pi400 guide, which is designed to appeal to young school children.
It slowly became clear that one has to invoke Tkinter (or something like it) if one is going to create a window. If you imagine that Qptr is difficult, just try using Tkinter.
I managed to use it only by slavishly copying code from the internet. Creating an .ex file took me a while to master. The process was not obvious.
I gave up using Python on a Pi because I found it easier to use when installed on a PC. (another process that was not “easy”)
Having written a windowing Python program with just a few lines of code, the challenge was to do the same with Qptr.
( I do not use Easyptr). The screenshot demonstrates equivalent programs from each language.
In my opinion neither OOP nor Python is easy to understand or use. The Python.exe file at 9Mbytes is 1600 times bigger than the SMS.obj file, and isn't the SMS Thing system a more advanced concept than the OOP paradigm?
I imagine that my procedure P_wdraw, for example, could be written in assembler and installed as a Thing. In that case it would act in a similar way to Python’s Tk() Object.
I have suggested that SBASIC is difficult. I can now say, “not half as difficult as the ultra popular Python programming language”.