You are here: Re: php 5 classes: public, protected and private « PHP Programming Language « IT news, forums, messages
Re: php 5 classes: public, protected and private

Posted by Tony Marston on 12/05/06 10:00

"Moot" <mootmail-googlegroups@yahoo.com> wrote in message
news:1165245490.539681.80340@j44g2000cwa.googlegroups.com...
> Tony Marston wrote:
>> "Michael Fesser" <netizen@gmx.de> wrote in message
>> news:41p6n25hg3kvfq2ag3brc9169votqrcd3c@4ax.com...
>> > .oO(Tony Marston)
>> >
>> >>This is a PHP newsgroup, so I am explaining how interfaces work within
>> >>PHP.
>> >
>> > OK, please do that, no empty promises. Please explain, what interfaces
>> > in PHP are and what you can do with them. Or can't do. I'm listening!
>> >
>> > Micha
>>
>> It is a simple argument. In PHP interfaces are optional. I *do not* have
>> to
>> define an interface before I can access a method in an object. The fact
>> that
>> interfaces may have their uses in specialised circumstances does not get
>> away from the fact that under normal use they are optional.
>>
>> --
>> Tony Marston
>> http://www.tonymarston.net
>> http://www.radicore.org
>
> - Interfaces are optional, you don't need to use them to access class
> functions.
> - Classes are optional, you don't need to define them to use functions
> and have reusable code.
> - High level languages are optional, you don't need to use them to
> access the computer's registers and memory
> - All programming languages are optional, you can just write the
> machine code directly
>
> Optional != Useless
>
> The whole point of all of these languages, paradigms, and concepts we
> have available to us isn't to force you to use them, it's to make the
> trivial details disappear so you can focus at a higher level and more
> abstract ideas. If you don't want to use them, that's your choice, but
> they wouldn't exist if lots of people didn't find them useful.

Some people may find them useful, whie others have no use for them at all.
It is a matter of choice.

> And if the point you're trying to argue is merely that interfaces are
> optional, then I think that's a very silly argument to make.

It is a perfectly valid argument against the idea that because interfaces
are there you MUST use them.

> Yes, PHP
> doesn't *force* you to use interfaces. You win that point.

Good. That was the only point I was making.

> Way to go.
> Next up: I claim that the sky is sometimes blue.

And your point is?

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

 

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

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