|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> > Then they are not object-oriented languages. Some kind of inheritance is
> > a basic feature of object-oriented languages.
> This isn't correct. There are, for example, delegation-based OO
> languages, wherein you say "Anything I don't handle, that other class
> over there handles", but it's not an inheritance heirarchy as such. It's
> merely delegation.
Who defines that object-orientedness may not have inheritance?
The "is-a" (and "has-a") relation between classes is a fundamental
property of object-orientedness.
> No, this is not correct. While it's true that most popular
> object-oriented languages support inheritance, you can have OO languages
> without inheritance.
In what basis can you call it an OO language?
Having modules is not sufficient.
> Imagine Java with no inheritance of functions, only "inheritance" of
> what java calls interfaces. Does it stop being "object oriented"? Most
> people working in the field of designing programming languages I think
> would say "no, it's still OO". It still has objects, dynamic dispatch,
> memory management, classes, instances, etc. Just not inheritance.
If you inherit class X from class Y you are saying "X is a Y" (that is,
it implements everything Y implements and behaves like Y).
Y may be completely abstract, meaning that it does not implement anything
itself. However, deriving a class from it still means that the derived
class "is a Y".
If you make a class which implements an interface you are doing inheritance.
Limited perhaps, but still inheritance.
(By the way, what does memory management have to do with OO?)
--
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |