3 ms·
I like private sometimes, but encapsulation is at its core tied to the notion of identity and hence nominal typing. If a name stands to represent something rath
by seanmcdirmid 6y ago
I like private sometimes, but encapsulation is at its core tied to the notion of identity and hence nominal typing. If a name stands to represent something rather than its structure, well, that name is basically encapsulating.
Even in functional languages names are used all the time with a huge amount of encapsulation behind them. They just don't have the benefit of a type system to manage that.