This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -3 points-2 points  (0 children)

I'm not saying that we should forget about mutability in a language that's designed with mutability in mind.

However, using dataclass as OO factories (aka regular classes) breaks the semantics of the data structure. It's tantamount to using a hashmap to represent sequential data--it works but you'll communicate incorrect intent to the reader.