D - more power than (really) needed !
Hasan Aljudy
hasan.aljudy at gmail.com
Thu Mar 9 10:04:01 PST 2006
Lars Ivar Igesund wrote:
<snip>
>
> I get a feeling sometimes that there is a belief that the languages
> preaching OOP (Java, Eiffel, etc) defines OO. Object orientation is an idea
> of how to group what belong to each other together. There are umpteen books
> on best practices how to do this
True, OO is not so well defined, mainly because alot of people think
they understand oop, when they really don't.
I wish the whole world learned object oriented principles from Schock
http://pages.cpsc.ucalgary.ca/~schock/courses/w05/cpsc233/lectures.html
>, and AFAICS, the Java books from the past
> two years differs hugely from those I used back in 98-99 when I started at
> the University. Especially I read the other day that although inheritance
> solves a lot, it is often a bad practice if you want a system that is
> reusable and extensible (Head First Design Patterns, one of the current top
> books in the Java category.)
The problem is when people look at OOP superficially as a set of tools,
e.g. inheritance!
OOP is not a set of tools, it's a set of principles. Inheritance is not
there just for the sake of it, it serves a very good purpose: increasing
cohesion by pulling common/shared code in a super class.
You can (hypothetically, at least) write object oriented code that
doesn't use inheritance, and you can write non-object oriented code that
uses inheritance & classes (this happens alot).
More information about the Digitalmars-d
mailing list