NoneType List

avi.e.gross at gmail.com avi.e.gross at gmail.com
Mon Jan 2 00:19:49 EST 2023


Not to wax poetic about our pasts, Thomas, but I do did not start with
PASCAL and used quite a few languages before and plenty after. At the time
it had interesting contrasts to languages like BASIC, FORTRAN and LISP and I
tended to use whatever was available on the machines I was using. My first
computer job (other than in grad school itself) was using OMSI PASCAL. I
even wrote my thesis as a PASCAL program containing comments that included
typesetting instructions in a language called RUNOFF while the PASCAL
program itself was a set of comments as far as RUNOFF was concerned. So it
compiled or was typeset and printed from the same source.

 But my next job after graduation was for Bell Labs and I had to forget all
the mainframe or DEC systems and adapt to UNIX, and of course C and later
C++ and the various other little languages that came with that such as AWK
and PERL ...

There is no one right language but there often is a small set of right
languages given your circumstances, such as what your employer has everyone
using and especially in group projects.

To be fair, languages like Python and R seem to keep having parts rewritten
in C or C++ to make some things run faster and can include libraries written
ages ago in languages like FORTRAN that have been finely tuned. Under the
hood, these languages often hide parts so that developing a new python (or R
or ...) module/package can start by writing it all in that language and then
taking some functionality and rewriting it in the other language for
critical regions where a slower interpreted method may be speeded up.

But for prototyping, or when speed is not a big deal, I really prefer Python
to ...


-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=gmail.com at python.org> On
Behalf Of Thomas Passin
Sent: Sunday, January 1, 2023 10:15 PM
To: python-list at python.org
Subject: Re: NoneType List

On 1/1/2023 9:14 PM, avi.e.gross at gmail.com wrote:
> Thomas,
> 
> I used PASCAL before C and I felt like I was wearing a straitjacket at 
> times in PASCAL when I was trying to write encryption/decryption 
> functions and had to find ways to fiddle with bits. Similar things 
> were easy in C, and are even easier in many more recent languages such 
> as Python.

PASCAL was not the first language I learned.  I won't pretend I had to do
anything very complicated, or do much bit-twiddling.  It was, though, the
first one (except probably for FORTH) I enjoyed programming with more than I
disliked the boiler-plate formalities.

> The distinction between teaching a first language, or one that is so 
> cautious as to catch and prevent all mistakes it can, is not for 
> people willing to be bolder or work faster or write routines that can 
> be used more generally.
> 
> What has not been mentioned is that languages like python go a step 
> further and allow a function to return many arguments and even a 
> varying number of arguments, as well as none at all. To do anything 
> like that in PASCAL

(or C, for that matter)

> took some thought on how to make some structure you could fill out 
> then return as a single value that the receiving code had to sort of 
> decode and perhaps deal with parts that could hold a union of several 
> things. Can a compiler or interpreter easily verify you did something 
> reasonable, as compared to say python that allows something like:
> 
> (res1, res2, _, res4, _, rest) = f(x)

Yes, that's one of the good things about Python, how it makes working with
tuples so easy and natural.  OTOH, harking back to PASCAL for a minute, it
had enumerations and sets long before Python got them.

> The above tells the interpreter you expect perhaps 6 or more results 
> and what to do with them.
> 
> 
> 
> -----Original Message----- From: Python-list 
> <python-list-bounces+avi.e.gross=gmail.com at python.org> On Behalf Of 
> Thomas Passin Sent: Sunday, January 1, 2023 1:03 PM To:
> python-list at python.org Subject: Re: NoneType List
> 
> On 1/1/2023 8:47 AM, Stefan Ram wrote:
>> Thomas Passin <list1 at tompassin.net> writes:
>>> Guido had been working on the ABC language for some years before he 
>>> developed Python.  ABC was intended mainly as a teaching and 
>>> prototyping language.
>> 
>> In those days, there used to be a language called "Pascal". Pascal 
>> had a dichotomy between "functions" and "procedures". A call to a 
>> function was intended to have a value. A call to a procedure was 
>> intended to have an effect.
> 
> Wirth developed Pascal as a teaching language. IIRC, originally it was 
> taught to students before there were any implementations. I did most 
> of my programming with Turbo Pascal for many years.  Just to clarify 
> what you wrote above, in Pascal a "procedure" does not return anything 
> while a "function" does.
> 
> I really liked (Turbo) Pascal and I hated C back then.  No wonder I 
> like Python so much.  It must be something about how my mind works.
> 
>> For some beginners, the difference between a value and and effect can 
>> be hard to grasp. So, Pascal's distinction helps to hammer that home.
>> 
>> Experienced programmers know the difference and do no longer require 
>> the effort of the language to teach it to them.
>> 
>> The time when someone is a beginner and still struggles to understand 
>> the difference between values and effects usually is significantly 
>> shorter than the later time where he has understood it and is 
>> programming productively, so it might be better when the language is 
>> adapted to people who already have understood the difference.
>> 
>> 
> 
> -- https://mail.python.org/mailman/listinfo/python-list
> 

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



More information about the Python-list mailing list