The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

BartC bc at freeuk.com
Tue Mar 15 08:02:44 EDT 2016


On 15/03/2016 09:20, alister wrote:

> Why would i do somthing so pointless?

Name references are pointless? OK, you're the expert ...

> how does this grab you (it often catches newbies out)
>
> def test(x):
> 	a.append('oops')
>
> a=['a list']
> test(a)
> print (a)

Not any more.

>
> I sugest you may want to start reading a good python tutorial.

Last year I started implementing a Python clone. I stopped the project 
because it meant losing too many features I was used to. Also I had 
doubts whether I could even make it as fast as CPython (which had a 
25-year head start).

I've since introduced some aspects of Python (object references) into an 
existing language, while still keeping name references.

Anyway, what I'm saying is, trying to implement a language is also a 
good way of learning it, especially of finding out how it works.

-- 
Bartc



More information about the Python-list mailing list