Default Value

MRAB python at mrabarnett.plus.com
Fri Jun 21 22:04:18 EDT 2013


On 22/06/2013 02:40, Chris Angelico wrote:
> On Sat, Jun 22, 2013 at 11:31 AM, Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> wrote:
>> Thinking about this, I think that the only safe thing to do in Rickython
>> 4000 is to prohibit putting mutable objects inside tuples. Putting a list
>> or a dict inside a tuple is just a bug waiting to happen!
>
> I think you're onto something here, but you really haven't gone far
> enough. Mutable objects *anywhere* are a problem. The solution?
> Abolish mutable objects. Strings (bytes and Unicode), integers,
> decimals (floats are a problem to many people), tuples of the above,
> and dictionaries mapping any of the above to any other of the above,
> should be enough to do everything.
>
Pure functional languages don't have mutables, or even variables, but
then we're not talking about a pure functional language, we're talking
about Python.



More information about the Python-list mailing list