Re: [PHP-DEV] protected interface methods

2003-07-04 Thread Andi Gutmans
At 01:06 AM 4/7/2003 +0200, Marcus Börger wrote: AG> Just in case I wasn't clear, interfaces *are* meant to be a contract to the AG> outside world and aren't supposed to be used for all sorts of internal AG> hierarchy stuff. AG> If they allow PPP modifiers today then that is a bug IMO. Of course

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Sebastian Bergmann
Andi Gutmans wrote: > Interfaces should not support access modifiers and should by default be > public. +1 -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/ -- PHP Interna

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Marcus Börger
Hello Andi, Friday, July 4, 2003, 1:53:48 AM, you wrote: AG> At 01:51 AM 4/7/2003 +0200, Andi Gutmans wrote: >>At 06:03 PM 3/7/2003 +0200, Marcus Börger wrote: >>>Hello internals, >>> >>>It is of course correct that an interface method cannot be declared private >>>but i think it should be possib

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Andi Gutmans
At 01:51 AM 4/7/2003 +0200, Andi Gutmans wrote: At 06:03 PM 3/7/2003 +0200, Marcus Börger wrote: Hello internals, It is of course correct that an interface method cannot be declared private but i think it should be possible to declare it protected. Interfaces should not support access modifiers an

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Andi Gutmans
At 06:03 PM 3/7/2003 +0200, Marcus Börger wrote: Hello internals, It is of course correct that an interface method cannot be declared private but i think it should be possible to declare it protected. Interfaces should not support access modifiers and should by default be public. Andi -- PHP Int

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Marcus Börger
Hello Moriyoshi, Thursday, July 3, 2003, 7:13:44 PM, you wrote: MK> [EMAIL PROTECTED] (Marcus Börger) wrote: >> Nice idea, but one thing i wanted is to disable cloning of class objects. >> >> The following class makes cloning impossible for all derived classes: >> class no_clone { >> final pr

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Moriyoshi Koizumi
[EMAIL PROTECTED] (Marcus Börger) wrote: > Nice idea, but one thing i wanted is to disable cloning of class objects. > > The following class makes cloning impossible for all derived classes: > class no_clone { > final private __clone() {} > } > > but the all classes that should not be cloned m

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Marcus Börger
Hello Moriyoshi, Thursday, July 3, 2003, 6:50:46 PM, you wrote: MK> [EMAIL PROTECTED] (Marcus Börger) wrote: >> Not really. An interface simply describes a protocol subset that must be part >> of the implementing class's protocol. In that it makes no sense to allow final >> or private methods in

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Moriyoshi Koizumi
[EMAIL PROTECTED] (Marcus Börger) wrote: > Not really. An interface simply describes a protocol subset that must be part > of the implementing class's protocol. In that it makes no sense to allow final > or private methods in an interface but still a protected member in an interface > would descri

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Jan Schneider
Zitat von Moriyoshi Koizumi <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] (Marcus Börger) wrote: > > > Hello internals, > > > > It is of course correct that an interface method cannot be declared > private > > but i think it should be possible to declare it protected. > > I don't see the benefit to all

Re: [PHP-DEV] protected interface methods

2003-07-03 Thread Moriyoshi Koizumi
[EMAIL PROTECTED] (Marcus Börger) wrote: > Hello internals, > > It is of course correct that an interface method cannot be declared private > but i think it should be possible to declare it protected. I don't see the benefit to allow interfaces to have protected methods as I use abstracts for t