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))

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

Reply via email to