Hacker News new | ask | show | jobs
by lmm 2787 days ago
> if you can poke at the data then you can violate contracts that give rise to the common structure.

Maybe if you can mutate it, but having it be visible isn't an issue.

> Abstract datatypes certainly hide mutable state.

ADTs are normally understood to be values i.e. immutable. Hidden structure is not the same thing as hidden state.