Re: Python
- Posted by David Cuny <dcuny at LANSET.COM> Aug 26, 2000
- 429 views
After my Python rant, I plunked down my $25 Border's gift certificate for O'Reilly's "Learning Python" for some nightime reading. (Yes, I slept quite soundly) The ugly truth comes out: in Python, a list is little more than an array of pointers. If you write something like this: >>> x = [1,2,3] >>> y = [ 'a', 'b', x ] you get the expected result that Euphoria would give you: >>> print y ['a', 'b', [1,2,3]] But if you change the value of x: >>> x = 'c' and you've altered y as well: >>> print y ['a', 'b', 'c'] This makes it easy for the compiler writers - all the work is shoved off on the poor coders! This is the same nonsense that Java does - they hide the pointer from you, but you still get the same nasty side-effects. I guess I've really been spoiled by Euphoria. Ah, well. I got the book to see how they implement namespaces, classes and other goodies, not sequences. I'll be chiming in with my new wishlist, now that Robert's got free time on his time. -- David Cuny