You are here: Re: Object Oriented PHP « PHP Programming Language « IT news, forums, messages
Re: Object Oriented PHP

Posted by Jerry Stuckle on 06/25/06 03:00

David Haynes wrote:
> Jerry Stuckle wrote:
>
>> PHP does have some polymorphic-like abilities, but that's because of
>> the untyped nature of the variables.
>>
>> PHP is getting better in it's OO aspects, but I doubt it will ever be
>> quite like Java. There's just a basic difference between languages
>> with typed and untyped variables.
>
>
> I was thinking about this the other day and it may not be all that
> difficult to add it.
>
> Consider that you can already type the arguments to the constructor.
> Given this, it would not be all that hard to derive a typed signature
> which could then be applied.
>
> -david-
>

I really don't know how hard it would be to add - but I would like to see it
added. One thing I don't like all that much is the untyped variables. It makes
things "easy" - but leads to some sloppy programming.

It also means you can't overload functions - at least not with the same number
of parms. Typing the constructor arguments is a good start. But expanding that
to other functions without breaking existing code might be more difficult.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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