In the paragraph
"What we just did is effectively the same as what Java does to handle the visibility modifiers public, private, etc. The “private version” of a class is like the Impl version above: anyone who can see that version gets to see all the exposed items (fields in Java, types in OCaml), without any encapsulation. The “public version” of a class is like the sealed version above: anyone who can see that version is forced to treat the items as abstract, hence encapsulated."
Should private and public be switched? Would "private" be the encapsulated version and "public" be the exposed version?
In the paragraph "What we just did is effectively the same as what Java does to handle the visibility modifiers public, private, etc. The “private version” of a class is like the Impl version above: anyone who can see that version gets to see all the exposed items (fields in Java, types in OCaml), without any encapsulation. The “public version” of a class is like the sealed version above: anyone who can see that version is forced to treat the items as abstract, hence encapsulated."
Should private and public be switched? Would "private" be the encapsulated version and "public" be the exposed version?