On Thu, Feb 5, 2015 at 2:38 PM, Patrick Schaaf <p...@bof.de> wrote:

> Am 05.02.2015 12:14 schrieb "Dmitry Stogov" <dmi...@zend.com>:
> >
> > For php it may look like the following:
> >
> > function foo()
> >     require(<input-assert-expression>)
> >     ensure(<output-assert-expression>)
> > {
> >   ...
> > }
> >
> > It would require only one new reserved word "ensure".
>
> How would one access the function return value in the
> output-assert-expression?
>

good point. we may use a reserved name. e.g. $result.or $return_value

> And what about side effects in these expressions? Could they be suppressed
> / made into errors somehow?
>
I afraid, we won't be able catch possible side effects of assert
expressions.
For now, we may just relay on user, in the same way as with assert() now.

Thanks. Dmitry.


> best regards
>   Patrick
>

Reply via email to