DEV Community

Discussion on: Why should I care about immutables in python?

Collapse
 
himankbhalla profile image
himank

Immutability comes at a cost, and it is not necessarily a good solution in every situation. The primary basis of languages like c++, java, python etc is mutability. The flexibility we have with mutability also comes at a cost. Further, Python is deeply influenced by c++ and is geared for c++ programmers in a dynamic world. so mutable data structure is expected. It is a matter of language design and what problems or domain the language needs to cater to. Currently, I believe python is somewhere in the middle. Trying to do everything. whether it is oop, functional and what not.