Re: RFC: expectations/assertions
| From: | Yasuo Ohgaki | Date: | Mon, 03 Feb 2014 09:59:55 +0000 |
| Subject: | Re: RFC: expectations/assertions | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72065@lists.php.net to get a copy of this message | ||
Hi Pierre,
On Mon, Feb 3, 2014 at 6:11 PM, Pierre Joye <pierre.php@gmail.com> wrote:
> I also discussed with a couple of developers being intensively
> involved in testing tools and framework for php and the consensus is
> that they do not need it for the large majority. A minority even
> considers this feature as not really good, assert never was a good
> thing to use (I never used for example).
>
For testers and test tools developers, or even framework developer,
assertion
may not be important. Framework may have contract via annotations.
However, it is important for developers who is not rely on framework to
make
sure data is processed as developer expects.
It would be important for portable library developers especially. Since
they do not
want to rely on specific frameworks nor they cannot assume user tests/code
are
valid one. Assertion works perfectly for portable library developers to
achieve
both performance and reliability.
Assertion is useful for basic form of DbC. DbC could achieve fast, yet
reliable
applications. Extensive use of assertion is required if developer choose to
do
so. It is important to remove assertion overheads from production code.
Therefore, this RFC is valuable people who care about DbC and prefer to use
light weight frameworks like myself.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net