Sealed classes and methods: Difference between revisions

m
Line 27:
In Phix, "private" determines availability from outside [sub-]class code, but there is nothing at all to prevent Child from
having a public method that (internally) invokes a private method of the Parent, and of course/not unlike it would make no difference were name and age made private below.<br>
The Phix compiler can make exactly the same optimisations were it to spot at EOF that a classmethod haswas not been overidden as it could were it told up-front.
as it could were it told up-front.
{{trans|Wren}}
Extended to include an under-age parent
7,794

edits