Behavior of the for-else construct

Avi Gross avigross at verizon.net
Sat Mar 5 16:40:08 EST 2022


I am not sure how we end up conversing about PASCAL on a Python forum. But it is worth considering how people educated in aspects of Computer Science often come from somewhat different background and how it flavors what they do now.

I paid no attention to where PASCAL was being used other than I did much of my grad school work in PASCAL in the early 80's including my thesis being a document that could be typeset or run from the same file ;-)

And my first job in the field also was doing programming in PASCAL. At the time it seemed to be a new and upcoming language with lots of nifty features. It seemed to have so many ways it was an improvement on languages I had been using including BASIC and Fortran and versions of LISP. So it was a tad surprising when my next job at Bell Labs focused on C (and later C++) as well as a large array of utilities and small languages in the UNIX world. PASCAL was nowhere to be seen nor others that arrived to take over the world like Modula and Ada, and yet didn't. It depends where you are and on your perspective, and perhaps it survived in places like Europe and often has been enhanced. We have mentioned how things like Fortran keep evolving and, in any case, tons of the code we use in aspects of Python and especially some add-in modules, is from libraries of well-honed   libraries of functions written in Fortran or C or I am sure in some cases even assembler languages.

I wonder if some languages of the future may supersede languages like Python but retain aspects of them in a similar way? As a hobby, I study lots of languages to see if they add anything or are likely to take over. Some seem to really be focused on a company like Microsoft or Google using it for their own purposes and others who wish to play in their arena may have to go along to operate there. Others seem to be the kind of things academics invent to play with various ideas. So will SCALA or GO or RUST become major players or will they wither away? Will languages that make major changes that make older software not compatible, think Python or PERL as examples, end up stronger or ... motivate some to abandon their projects and switch to a new language/system/paradigm?

I do a lot of data manipulation in an assortment of languages including multiple methods within a language. I can sometimes see how a person asking for features or writing programs has been influenced by earlier experiences. Database people who started with a relational database and mainly used some dialect of SQL, may face some problems in their own way and think making lots of smaller tables in third normal form and constantly doing all kinds of table merges is the natural way to do things. Those who start doing things using Python or R may view things quite differently and often see ways to do things gradually and in a pipelined method and not do what is seen as expensive operations like some kinds of merge. I am not saying everyone does things in a stereotypical way, just that people learn tools and methods and it may show.

Given how much faster some things have become, even hybrid programmers may play games. Yes, you can issue SQL to load data from a database into your Python or R programs but some issue a very basic command and then massage it locally while others do most of the processing in the SQL component so that less is dragged in. Some habits persist even after circumstances change.

I have little against PASCAL and have not looked at how it has evolved but found it a very limiting language after a while. But I find most languages somewhat limited and now think they should be. What makes a language great for me is if it does not try to be too complete but provides a way to extend it so people can come up with their own ways to do more complex things, including various ways to do graphics or statistical analyses and so on, as sort of add-ons which become little languages or worlds grafted on when needed and ignored when not.

Python qualifies albeit it is already too bloated! LOL!


Avi

Palm: 3rd digit from the right, vertically.


-----Original Message-----
From: Michael F. Stemper <michael.stemper at gmail.com>
To: python-list at python.org
Sent: Sat, Mar 5, 2022 1:39 pm
Subject: Re: Behavior of the for-else construct


On 04/03/2022 18.11, Peter J. Holzer wrote:

> On 2022-03-04 23:47:09 +0000, Avi Gross via Python-list wrote:

>> I am not sure a reply is needed, Peter, and what you say is true. But

>> as you point out, when using a German keyboard, I would  already have

>> a way to enter symbols like ä, ö, ü and ß and no reason not to include

>> them in variable names and so on if UNICODE is being used properly. I

>> can use my last name in German notation as a variable in Python now:

>>

>> Groß = 144

>> Groß / 12

>> 12.0

> 

> Yes, I'm using umlauts occasionally in variable names in Python, and

> I've also used Greek characters and others.

> 

> But in Python I CAN use them. I DON'T HAVE to.

> 

> That's a big difference.

> 

> Characters like [] or {} are a part of Python's syntax. You can't avoid

> using them. If you can't type them, you can't write Python. If it is

> awkward to enter them (like having to type Alt-91 or pasting them from a

> character table) it is painful to write programs.

> 

> German keyboards aquired an AltGr key and the ability to type these

> characters in the mid to late 1980's. Presumably because those

> characters were common in C and other programming languages



... especially Pascal, which was probably bigger in Germany and Austria

in the 1980s than was C.



-- 

Michael F. Stemper

Psalm 94:3-6

-- 

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



More information about the Python-list mailing list