RepoSense icon indicating copy to clipboard operation
RepoSense copied to clipboard

Immutable Model Classes

Open georgetayqy opened this issue 8 months ago • 0 comments

What feature(s) would you like to see in RepoSense

The current implementation of the model classes does not always guarantee immutability. As such, there is a risk that modifying an instance of a model class may result in unintended side effects on other instances of the same or different model classes.

As such, we should look into refactoring the model classes such that operations that accepts objects or returns objects will return new instances of said object containing identical information as the original copy of the object.

Is the feature request related to a problem?

Related to #2119 and #2124.

If possible, describe the solution

We could start with the smaller model classes first, and attempt to turn them immutable first, before moving on to the more complex model classes.

If applicable, describe alternatives you've considered

N/A

Additional context

N/A

georgetayqy avatar Jun 09 '24 06:06 georgetayqy