anything like C++ references?

Stephen Horne intentionally at blank.co.uk
Tue Jul 15 17:04:29 EDT 2003


On 15 Jul 2003 10:45:10 -0700, owski at hotmail.com (Adam Ruth) wrote:

>I came to Python from Ada, and all I have to say is:  Pointer-like
>semantics are evil.  They're worse than goto's, they're deadly,
>damaging, and should be avoided at all costs.
>
>They're an unhappy necessity, akin to stop-lights.  You need them
>because roads intersect, but if roads don't intersect, don't use them!

Absolutely true. And the worst thing you can do when you really can't
avoid pointers is to obscure the issue even more by disguising them as
something else.

The biggest problems with pointers relate to things with pointer math,
pointers to deleted objects etc. These things need not exist in a
scripting language that provides pointers - pointers don't have to be
implemented using store addresses. That is just a concept from C, C++,
Pascal, Ada etc - not something I want to see imitated. If pointers
can be created that refer to given objects, and if pointers can be
dereferenced, that is actually enough to support indirect referencing.





More information about the Python-list mailing list