cs3110 / textbook

The CS 3110 Textbook, "OCaml Programming: Correct + Efficient + Beautiful"
Other
720 stars 132 forks source link

Issue on page /chapters/modules/includes.html #108

Closed whj0000 closed 1 year ago

whj0000 commented 1 year ago

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?

clarksmr commented 1 year ago

No, the wording is correct. If you are a current student please come to office hours with me or a TA so we can explain further!