I was originally going to talk about freezing but then I decided to scope the article down to only the bare essentials.
I know if you do a freeze on the whole class instance it has weird effects on subclasses and inheritance in general. But it is a pretty good idea to "ensure" that nobody can mutate stuff.
I do think that in some cases you might want to keep your classes mutable though. Just depends on the use case and what you're using them for.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I was originally going to talk about freezing but then I decided to scope the article down to only the bare essentials.
I know if you do a freeze on the whole class instance it has weird effects on subclasses and inheritance in general. But it is a pretty good idea to "ensure" that nobody can mutate stuff.
I do think that in some cases you might want to keep your classes mutable though. Just depends on the use case and what you're using them for.