Hi Yasuo,

> De : yohg...@gmail.com [mailto:yohg...@gmail.com] De la part de Yasuo Ohgaki
>
> We have discussed most of issues for https://wiki.php.net/rfc/dbc2

I am not sure anyone except hardly 5 people has the impression that the subject 
was discussed, as the RFCs were not even officially announced on the list. OK, 
you discussed with 2 or 3 people about building your RFC. Now, the RFC is here, 
and the REAL OPEN discussion can start with a new thread prefixed with '[RFC]'. 
You cannot open a vote before anyone had a chance to give its opinion.

Actually, I was waiting for the end of the 'scalar type hinting' vote to start 
the DbC discussion but we can start it now.

About all the missing stuff you include in your mail, is your RFC really ready 
to start a discussion if there are still so many missing things ? I'm afraid it 
is not.

> "These observations shed light on the true significance of inheritance: not 
> just a reuse, 
> subtyping and classification mechanism, but a way to ensure compatible 
> semantics by 
> other means. They also provide useful guidance as to how to use inheritance 
> properly."

Do you seriously plan to include such bullshit in your RFC ?

> For method calls, overridden method should not evaluate parents contract on 
> entry.
> It should be evaluated when parent method is called. 

I already told you : the logic you are using for pre-conditions is NOT 
compatible with Eiffel and D logic, although this is what you're supposed to 
mimic. It is actually the opposite. Is it a wanted behavior ? because you 
should be aware that it does not respect the LS principle.

> - Consider introduction of static require() as class invariant for static 
> methods
> I probably don't understand the idea correctly. Could you give some 
> explanations?

He's probably talking about a new set of conditions that couldn't use '$this'. 
Unlike 'dynamic' invariants, these can also be checked before and after static 
methods.

> Syntax is not my priority.
> We are better to avoid new keyword whenever it's possible.

Just my opinion : syntax IS important. I agree that new keywords should be 
avoided but reusing 'require' and 'return' is too ambiguous. I say that syntax 
is important because I'm sure that's the only point people will complain about.

> How to manage votes for 2 RFCs

Your RFC is not even ready for discussion. Anyway, the vote will probably be 
about your RFC only.

> ==Annotation DbC Implementation==
> Dmitry, I guess it wouldn't be too hard for you to implement this RFC. How 
> about annotation
> version? Can it be implemented with reasonable amount of efforts?

My RFC is not supposed to be implemented in the core. Derick is OK to help me 
adding the feature to Xdebug. This way, it will be available for every PHP 
versions supported by Xdebug.

Actually, I keep the RFC to get people's opinion and to refine what I have in 
mind after scalar type hints are voted upon but, technically, I don't need it 
anymore.

> Native DbC support syntax:
> class Child {
>     require($this->age < 18); // Invariant (Class state condition)

If, after writing the RFC, you keep writing your conditions after the first 
'{', are you sure your syntax is so intuitive ? ;)

And, please, prefix lines with '>' chars when you post a reply. Thanks.

Cheers

François



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to