Content deleted Content added
Removal of reference to Oz as a multi-paradigm language |
|||
Line 278:
The reference to Oz I had introduced a few months ago as a multi-paradigm language (like Python & Perl) has been removed and I can't see any discussion on the reason for this. Oz is considered by many as the most multi-paradigm language in existence today. Oz is the language used within the new book Concepts, Techniques, and Models of Computer Programming, MIT press. This book is already considered a classic, and possibly the equivalent of Structure and Interpretation of Computer Programs, by Sussman & Abelsson. See Lambda The Ultimate site for many references to this book. I therefore bring the reference to Oz back in the Python page.
== Parameter Passing ==
The explanation of parameter passing in Python needs work. It is a common confusion to say that Python passes values by reference (even among experienced Pythonistas), but GvR explains it correctly in his [http://www.python.org/doc/2.4/tut/node6.html#SECTION006600000000000000000 tutorial]. Basically, all parameters are passed by value, but object values are references. The reason this becomes an issue is that mutable objects appear to be passed by reference. Non-mutable objects such as numbers and strings don't show this behavior. What doesn't seem to be commonly understood is that the same issue shows up with assignment:
:x = [1, 2, 3]
:y = x
:x[:] = [3, 2, 1]
:print y
It's also a bit awkward to say that Python variables "contain" values. Python variables actually ''bind'' names to values which isn't the same thing. Looked at that way, you can see that after y = x, y and x are different names bound to the same value. Mutating the object bound to x will naturally affect the object bound to y -- it's the same object. That list isn't contained in two different places, it just has two different names.--[[User:Quale|Quale]] 20:56, 7 Mar 2005 (UTC)
|