Here are some comments from RISC OS folk when Python was mentioned at a recent Zoom meeting.
"Python is a rubbish language"
"We don't need two languages for beginners. We have BASIC and supporting Python is not the best use of scarce RISC OS developer resources."
"I am too old to learn another programming language."
Age does not come into it. Some people enjoy the
experience of a new challenge, some don't.
As Mark Twain put it:
"It is purely a matter of temperament.
Beliefs are ACQUIREMENTS, temperaments are BORN;
beliefs are subject to change,
nothing whatever can change temperament."
Python is functionally a bit richer than BASIC. It has more data types and it implements encapsulation, abstraction, inheritance, and polymorphism of an object-oriented-programming language. On the other hand BASIC has the ability to run inline assembler. If you are coding just using the native language features there is not a lot of difference in practice. With enough time, determination and effort you can do pretty well anything in BASIC or in Python.
What makes Python worth considering is that it comes with easy access to a shedload of easily accessible and freely available external library resources for making applications.
For example there are Python libraries for:-
And there are lots of large scale "Real-world" Applications which are written in Python such as:
But for me the best argument for learning Python is that it has brought back the "Joy of Coding". The thrill of starting up a BBC model B and writing BASIC games programs or drill type to help my school age children learn spelling or arithmatic.
Python is fun to learn and use. It has an elegant syntax
and has ocasional surprises. Monty Python fans will
appreciate the in-jokes.
In the change from Python2 to Python3 the print command syntax was altered. Instead of >>>print "hello" you had to write ...print("hello"). This broke thousands of programs. In order to ease the transition some modules were added to the Standard Library of Python3.
from the Python prompt try this:
>>> from __future__ import braces
>>> import antigravity
The following two parts are taken verbatim from the official Python sources. They are somewhat whimsical, but they do give a feel for the language.
In my view, the Pythonic code example is problematic. It is elegant and so passes Zen test 1, but arguably fails at 2, 3, 6, 7, 9, 13,and 17; but this might just be an example of the Dutch sense of humour.
An idea or piece of code which closely follows the most common idioms of the Python language, rather than implementing code using concepts common to other languages. For example, a common idiom in Python is to loop over all elements of an iterable using a for statement. Many other languages do not have this type of construct, so people unfamiliar with Python sometimes use a numerical counter instead:
for i in range(len(food))
print(food[i])
for piece in food:
print(piece)
© 2021 JR