You are here: Re: Using a Resource as a Class Property « PHP Programming Language « IT news, forums, messages
Re: Using a Resource as a Class Property

Posted by Sanders Kaufman on 07/23/07 13:17

Jerry Stuckle wrote:
> Michael Fesser wrote:

>> It's been a long time since I worked with Java and C++, but it looks
>> like you're right in these cases. I came from the Pascal/Delphi world;
>> in Object Pascal you have to explicitly call inherited constructors and
>> destructors.
>
> Object Pascal is not a true OO language. It's an OO extension to a
> structured language (and not a real good implementation at that - there
> are several holes in the way it is implemented). The ones I mentioned
> are true OO languages.

I may be getting too far out of scope here, but I seem to recall some
PHP guys getting all uppity about PHP not being true to OOP. Is there
anything to that, and if so, is it significant?

Of course - I may be thinking of waaay back when PHP stood for "Personal
Homepage Processor".



> No, Micha, it is improper OO. The base class is depending on something
> form the derived class. Additionally, in proper OO, A::data would be
> private to the base class. And the constructor for A would be called
> before the constructor to B ever got started.

I gotta say, even in my sophomoric understanding - that just makes good
sense.

OOP lives and dies on compartmentalization. If you build two
interdependent classes, then neither one can ever be an object unto
itself. That may be class-oriented, but it darn sure ain't object-oriented.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация