Conversation

Unpopular opinion: information hiding should be opted into by the consumer, and not forced by the producer.
Quote Tweet
Outside of parametricity I haven't found an information hiding mechanism that's doesn't turn out to a giant pain later on for all parties. Hide it behind some kind of forall or make it public.
1
1
By opting out of information hiding, the library user takes on the responsibility of keeping up with changes to internals. This is already how things work in assembly languages such as C or C++.
2
Show replies