Is there a pattern to restrict which classes can update another class?
- by Mike
Say I have a class ImportantInfo with a public writable property Data. Many classes will read this property but only a few will ever set it. Basically, if you want to update Data you should really know what you're doing.
Is there a pattern I could use to make this explicit other than by documenting it? For example, some way to enforce that only…