it seems like a few weeks ago... but actually it was more like 30 years ago that i was programming in C, and

Hen Hanna henhanna at gmail.com
Sun Feb 26 00:53:12 EST 2023


On Wednesday, February 22, 2023 at 10:38:00 PM UTC-8, Greg Ewing wrote:
> On 23/02/23 9:37 am, Hen Hanna wrote: 
> > for the first several weeks... whenever i used Python... all i could think of....was -------- this is really Lisp (inside) with a thin veil of Java/Pascal syntax.......... 
> > 
> > ----- that everything is first converted (macro-expanded) into (intermediated) Lisp code, and then.........
> I once toyed with the idea of implementing a Python compiler 
> by translating it into Scheme and then feeding it to a Scheme 
> compiler. 
> 
> But I quickly realised that, although Scheme and Python are 
> both dynamically-typed languages, Python is way *more* dynamic 
> than Scheme. 
> 
> So without doing some very serious static analysis, the best 
> I could do would be just putting together calls to runtime 
> support routines that implement all the dynamic dispatching 
> that Python does for its operators, etc., and the result 
> wouldn't be much better than an interpreter. 
> 
> There are some similarities between Python and Lisp-family 
> languages, but really Python is its own thing. 
> 
> -- 
> Greg



   Scope (and extent ?) of   variables is one reminder that  Python is not Lisp

     for    i     in      range(5):      print( i )
                     .........
     print( i )

ideally, after the FOR loop is done,  the (local) var  i should also disappear.
(this almost caused a bug for me)


Maybe in a future  ver. of Python,   it will be just like:

                     (dotimes  (i   5)   (print   i))



More information about the Python-list mailing list