Date: Mon, 25 Oct 1999 20:31:55 +0100
From: William Chesters <email@example.com>
Subject: Very very short question on objects
Christian RINDERKNECHT writes:
> Method [f] is not private... Shouldn't be this an error?
It's deliberate: from node3.html#ss:private-methods in the html docs:
Private methods can be made public in a subclass. [...] One
could think that a private method should remain private in a
subclass. However, it since the method is visible in a subclass,
it is always possible pick it's code and define a method of the
same name that run that code, [...]
In other words, ocaml's `private' is more like Java's `protected', and
afair Java's behaviour here agrees with ocaml's.
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:27 MET