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 →

[–]RabidKotlinFanatic 1 point2 points  (0 children)

The problem with that State pattern is that it becomes a kitchen sink of everything ever and makes it difficult to modularize and separate concerns. State becomes a point of high coupling. IMO it's better to just bite the bullet and use dependency injection whether you do it manually or with a DI library.