Hi,
As part of my work on GORA-94 I am contemplating removing or
refactoring the StateManager interface and corresponding (sole)
implementation, StateManagerImpl.

What is the use case for this class? It seems like it unnecessarily
complicates the implementation of persistent objects, and if people
aren't aware of what it does they might easily implement a persistent
object incorrectly by keeping two inconsistent state definitions. In
my opinion it also broadly breaks the OO principle of encapsulation.

I'd suggest one of two strategies - remove it, making the persistent
object itself the sole representation and source for its readable and
dirty state, or refactor persistent and remove the methods that
represent its dirty and readable state. It might make sense to turn it
into an inspector object like those used in HIVE's serde system.

I think the simplest solution is to remove it, but I could be missing something.

Thoughts?

Reply via email to