Mailing List Archive

Feature migration
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.

--
https://mail.python.org/mailman/listinfo/python-list
Re: Feature migration [ In reply to ]
On 9/03/23 8:29 am, avi.e.gross@gmail.com wrote:
> 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.

It's possible this was at least parttly inspired by functional languages
such as Haskell. Haskell has always allowed indentation as one way of
expressing structure. Python wasn't the first language to use
indentation semantically.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
RE: Feature migration [ In reply to ]
Greg,

Yes, it is very possible from other sources. I doubt it hurts if a popular
language, albeit not compiled the same way, uses a feature.

I see it a bit as more an impact on things like compiler/interpreter design
in that once you see it can reasonably be implemented, some features look
doable.

I will say the exact methods and rules are different enough and interact
with things differently. As an example, you can use an "end" statement at
the end of a block to signal what is ending.

As regularly repeated. There is no one right way but there are ways
supported by the language you are in and others ways that are NOT supported.

-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=gmail.com@python.org> On
Behalf Of Greg Ewing via Python-list
Sent: Wednesday, March 8, 2023 5:47 PM
To: python-list@python.org
Subject: Re: Feature migration

On 9/03/23 8:29 am, avi.e.gross@gmail.com wrote:
> 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.

It's possible this was at least parttly inspired by functional languages
such as Haskell. Haskell has always allowed indentation as one way of
expressing structure. Python wasn't the first language to use
indentation semantically.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

--
https://mail.python.org/mailman/listinfo/python-list