D - more power than (really) needed !

Lars Ivar Igesund larsivar at igesund.net
Thu Mar 9 12:04:38 PST 2006


Hasan Aljudy wrote:

> I wish the whole world learned object oriented principles from Schock
> http://pages.cpsc.ucalgary.ca/~schock/courses/w05/cpsc233/lectures.html

I doubt he is the only lecturer out there to have understood object
orientation ;)

> 
> The problem is when people look at OOP superficially as a set of tools,
> e.g. inheritance!

OOP _is_ a set of tools. Nothing more, nothing less.

> 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.

Yes, and by this you get tight coupling and reduced reusability and
extendability. Principles just get in the way for practicality. Using
inheritance just for the sake of it, or because of principles, is nothing
even close to practical.

But then my programming principles encompass pragmatism :)



More information about the Digitalmars-d mailing list