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 Moot on 12/04/06 15:18

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.

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. Yes, PHP
doesn't *force* you to use interfaces. You win that point. Way to go.
Next up: I claim that the sky is sometimes blue. Anyone care to
disagree?

- Moot

 

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

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