Feature migration

avi.e.gross at gmail.com avi.e.gross at gmail.com
Wed Mar 8 14:29:31 EST 2023


This may be of interest to a few and is only partially about Python.
 
In a recent discussion, I mentioned some new Python features (match) seemed
related to a very common feature that has been in a language like SCALA for
a long time. I suggested it might catch on and be used as widely as in SCALA
and become the pythonic way to do many things, whatever that means, even as
it's origins lie elsewhere.
 
This motivated me to go take a new look at SCALA and I was a bit surprised.
I will only mention two aspects as they relate to python. One is that they
made a version 3 that has significant incompatibilities with version 2.
Sounds familiar?
 
The other fascinated me. They seem to be partially copying from python a
feature that now appears everywhere but yet strive for some backwards
compatibility. They simplified the heck out of all kinds of expressions by
using INDENTATION. Lots of curly braces are now gone or optional. You need
to indent carefully, and in places it is not quite the same as python. It is
way more readable.
 
Python always had indentation as a key feature. Since SCALA did not, it
allows you to set options to turn off the new feature, sort of.
 
As I have been saying, all kinds of ideas in computer science can migrate to
new and existing languages, often not quite the same way. I am not endorsing
SCALA, just noting that I suspect Python had some influence.
 


More information about the Python-list mailing list