logoalt Hacker News

the__alchemistyesterday at 3:18 PM1 replyview on HN

I wish Python could move away from types-as-mutability-determiners. Or paper over them; all could have mutable and non-mutable variants, with "to_mut()" and "to_immut()" methods. And in the same vein, explicit control over whether functions mutate a variable in place, or make a local copy. Python is my first lang, and I still am unable to consistently reason about these.


Replies

Maledictusyesterday at 3:22 PM

I love Ruby's .freeze