3 ms·
A Diatribe on Maintaining State
- zachinglis 16y agoA rather long post but the subject is spot on! I totally agree.
- voxdolo 16y agoThe soul of brevity, I am not ;) Glad you enjoyed it though.
- RodgerTheGreat 16y agoThis article uses the phrase "maintaining state", but it's really talking about controlling the visibility of instance variables, and on a higher level using interfaces to provide loosely-coupled contracts for the behavior of classes. Using the same ideas within classes to "shield" instance variables from internal code is a good practice. While the examples are in Ruby, this is the kind of design philosophy that is typically applied to Java development. Perhaps there's some hope for Ruby after all. :)