What if globals make sense?
- by Greg
I've got a value that many objects need. For example, a financial application with different investments as objects, and most of them need the current interest rate.
I was hoping to encapsulate my "financial environment" as an object, with the interest rate as a property. But, sibling objects that need that value can't get to it.
So how do I share values among many objects without over-coupling my design? Obviously I'm thinking about this wrong.