Re: RFC: expectations/assertions

From: Date: Mon, 03 Feb 2014 21:14:37 +0000
Subject: Re: RFC: expectations/assertions
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Lester,

On Mon, Feb 3, 2014 at 7:19 PM, Lester Caine <[email protected]> wrote:

> Yasuo Ohgaki wrote:
>
>> 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.
>>
>
> And when did we agree to support DbC in the core?
> It really is feeling as if there are two versions of PHP being developed
> ... the one everybody uses and another 'fancy version' with all sorts of
> bells and whistles and just a very small minority want.
> Why can't all of these extensions simply be supported by third party tools
> ... which are already available ... and keep the core as simple as possible.


assert() is not new feature, but this RFC is for improving it.
Current assert() will call NULL function at run time. Therefore, there
would be overheads that cannot be ignored when assert() is used
extensively. With this RFC, run time overheads are removed.

I agree that this RFC would change the way script is coded.
Assertion can be used for DbC, but it's up to users if they use it for DbC
or not.
No existing code is affected in any way.

Regards,

--
Yasuo Ohgaki
[email protected]


Thread (44 messages)

« previous php.internals (#72124) next »