A protected field or method is similar to a private one, except that the method is visible within subclasses and can be overridden in subclasses. Although privately implementing interfaces covers similar ground, when working on rhombus/pict, using protected is clearer and simpler than a private-interface encoding.
A protected field or method is similar to a private one, except that the method is visible within subclasses and can be overridden in subclasses. Although privately implementing interfaces covers similar ground, when working on
rhombus/pict
, usingprotected
is clearer and simpler than a private-interface encoding.