not_a_commie said:
I have a fat class. I have lots of other classes that reference it. I
want to make a new fat class without requiring everyone to update
their references to it. Am I crazy? Any idea on how to pull this off?
Do you really mean "class", or do you mean "object"? You can simply alter an
objects fields to update it without having to change any references. You can
provide a convenience method that overwrites the fields by copying them from
another instance of the same class, so you effectively "overwrite" the
object with another.
If you do mean "class", you want a dynamically typed language, not a
statically typed language like C#. Those require that types are fully
specified at compile time and do not change at runtime. While you can get
around this with code generation and reflection, the resulting code would be
impossible to maintain, and it requires everyone to be aware of the
approach, so don't even go there.
You could conceivably mean something different altogether when you're
talking about "updating references", so do clarify.