performance of tuple-less Python?
quinn at amatho.ugcs.caltech.edu
Tue Nov 30 17:25:42 EST 1999
On Tue, 30 Nov 1999 08:14:36 GMT, Neil Schemenauer <nascheme at enme.ucalgary.ca>
>Phil Hunt <philh at vision25.demon.co.uk> wrote:
>>In article <1268226961-30285235 at hypernet.com>
>> gmcm at hypernet.com "Gordon McMillan" writes:
>>> They're only redundant if the concept of mutability is
>>> meaningless. A reference-based language without a concept
>>> of mutability would be, um, an adventure.
>Some values should be immutable. Consider if integers in Python
>were mutable. You store a reference to 1 and somewhere else the
>value of 1 is changed to 2. Is that not a problem? Also, you
>can not (efficiently) implement hash tables.
>Maybe you mean that mutability is not required. That would be an
>interesting language. How to you accomplish anything? Sometimes
>you want mutability and sometimes you don't. That is why both
>tuples and lists exist.
See any purely functional language, like haskell. You can simulate mutability
in haskell by passing monads around, but you might be surprised at how much
you can get done with no side effects.
And what was that party trick of changing 1 to equal 2 in forth? Maybe that's
more at the language level though, but I don't know much about forth (one of
More information about the Python-list