I don't understand this part. You can easily hide a public method of an object by coercing it to an object type which does not have that method. Modules also provide excellent information hiding: if you don't want anyone else calling your method, make at least one of its input types abstract in the interface, and don't provide any values of that type.
On Sat, Aug 27, 2011 at 12:37 PM, Gerd Stolpmann <[email protected]> wrote: > I guess the biggest problem is that structural > typing does not offer much for getting information hiding - once a > method is public, it is fully public. This is, in some sense, against > the mindset of the typical OCaml programmer. -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
