Re: RFC: Expectations

From: Date: Sat, 19 Oct 2013 14:43:13 +0000
Subject: Re: RFC: Expectations
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi,

On Fri, Oct 18, 2013 at 10:46 PM, Joe Watkins <[email protected]> wrote:

> Evening Chaps,
>
>         Following on from discussion regarding assertion API in PHP, the
> following RFC is now up for discussion:
>
>         https://wiki.php.net/rfc/**expectations<https://wiki.php.net/rfc/expectations>
>
>         Please do point out any missing sections or information, so that
> it can be clarified as quickly as possible.
>
>         I hope this conveys the idea a bit clearer to everyone ?
>
> Cheers
> Joe


I think it's a nice idea. However I am not so sure if it's worthy
introducing a new keyword 'except' which will break all existing code where
except is used as a function name, class name... Could it be actually
mentioned in the RFC that there is a new keyword? It's quite clear from the
examples but it would be nice if it could be specified as it's quite
important IMHO.

In addition I have got more technical question about using ext functions in
engine. I saw that you used php_trim in zend_compile.c. Is it a good idea
to do that? Wouldn't be better to create a new function (for example
zend_str_trim) in the engine (zend_operator.c comes to my mind as it
contains zend_str_tolower and other similar function) and then use this
function by php_trim?

Jakub


Thread (51 messages)

« previous php.internals (#69705) next »