Hi all,

On Tue, Feb 10, 2015 at 5:19 AM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:

> Use of interface:
>   - no additional keyword (pros)
>   - requires interface for DbC, most classes does not require interface
> (cons)
>   - if interface is not used, user has to repeat invariant conditions over
> and over (cons)
>   - requires to define method that should not exist in production (cons)
>
> New keyword:
>   - does not require interface for efficient definition (pros).
>   - new keyword (cons)
>
> It seems we are better to choose proper keyword for 'invariant'.
> 'invariant' is not common, so 'invariant'
> may be good enough choice. Does anyone use 'invariant' as
> function/method/class/constant names?
> If there is better name, suggestion is appreciated.
>

It might be be better to use special method. No keyword, use only reserved
method name __func().
I'll write what I think that are better for PHP in the RFC.
We may discuss anything here to complete the RFC.

Regards,

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

Reply via email to