Hi Stas,

On Sun, Mar 1, 2015 at 12:32 PM, Stanislav Malyshev <smalys...@gmail.com>
wrote:

> > https://wiki.php.net/rfc/introduce_design_by_contract
> >
> > This is vote only RFC for 2 competing Design by Contract(DbC) RFCs.
> > Please comment if you have any for this RFC.
>
> I don't see why the first one needs any vote. It is supposed to be
> implemented as an extension, so why not go and implement an extension,
> and put it in PECL, and then propose it for core inclusion, if it proves
> popular?
>

It's possible option with PHP7's AST.


>
> As for the second one, do we really need the syntax change that would
> just move asserts to before { instead of after? If we already have
> zero-cost asserts, why just not use them?


Assertion only DbC has limitations.

 - Invaliants
 - Postconditions

Without native DbC support, it ends up with messy code which is harder to
read. Less code readability decreases maintainability. Therefore, it
increases chance
of bugs. This is the reason why there are languages/extensions for DbC in
other
languages.

Regards,

--
Yasuo Ohgaki
yohg...@ohgaki.net

Reply via email to