4 ms·
That reminded me of Peter Norvig's comment: > Depending on your definition, CLOS is or is not object-oriented. It doesn't support encapsulation. Lack of encap
by arunix 4y ago
That reminded me of Peter Norvig's comment:
> Depending on your definition, CLOS is or is not object-oriented. It doesn't support encapsulation.
Lack of encapsulation would preclude the protection and hiding of state-process.
- dreamcompiler 4y agoIt depends on what you mean by encapsulation. CLOS classes don't own their methods, which makes CLOS much more flexible than other OOP systems. But it also means there are no "private" methods, or slots for that matter. One way to "privatize" slots or methods is to put them in a special package, which serves as a private namespace. This doesn't prevent programmers from seeing them but it can flag any use of them as "odd" style in the source code.