On 8/7/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
Pierre wrote:
> Hello,
>
> On 8/7/06, Marcus Boerger <[EMAIL PROTECTED]> wrote:
>
>> > class Foo {
>> > public interface function myFoo($x) { echo $x; } // strict
>> method signature enforced
>> > }
>>
>> > class Bar extends Foo {
>> > public function myFoo() { echo "bar"; } // this would be
>> E_FATAL
>> > }
>>
>> > class Qux extends Foo {
>> > public interface function myFoo($x) { echo $x; } // this is
>> okay.
>> > }
>>
>> Hmm i see some elegance here :-)
OT: that's a nice thing for a 'php mug' to hear coming from a 'php dev' :-)
>
> This is exactly what has been proposed last week, add a keyword to the
> declaration to mark a method as strict.
having reread the thread this does seem to be pretty much the case, although
my suggestion saves on adding a new keyword and by reusing the 'interface'
keyword hopefully sparks, in the mind of the developer, the direct correlation
between interfaces and strict methods.
Yes, but the idea is the same. It requires to explicitelly declare a
method as strict using an extra keyword. Using 'Interface' as keyword
makes sense, obviously :)
Cheers,
--Pierre
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php