|
![](/i/fill.gif) |
In article <4037b30f@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> Christopher James Huff <cja### [at] earthlink net> wrote:
> > def ColoredSphere: derive sphere {
>
> Is 'derive' any common OO term?
>
> The keyword I personally would like the most would be 'is_a', even
> though I can be happy with just 'inherits'.
Subclasses are often called derived classes. And "inherits" doesn't seem
to fit as well...ColoredSphere doesn't inherit sphere, it inherits from
sphere. And is_a seems to fit better as a boolean:
if(ColoredSphere is_a sphere)
...do something...
Or you could do what java does, and use "extends", but that doesn't
really fit with what I wrote, which declares the class as a value. Maybe
"extend" would work, but it seems too close to "extends", people coming
from Java would mistype it a lot. Of course, you could eliminate the
keyword altogether:
class ColoredSphere: sphere {...
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |