Hi all, On Fri, Nov 21, 2014 at 10:48 AM, Marcio Almada <marcio.w...@gmail.com> wrote:
> > Not a voter, but I don't really see the usefulness of this in core > either. > > True. This could be on packagist or a php ext, but should not be in > core. Main problem is that it carries too much ambiguity between > validation and coercion while doesn't solve the real problem: strict > typing. To be honest, I have mixed feeling for this FRC. Stricter type check is good. However, it requires runtime cost. There is an alternative solution that can achieve strict checks without runtime cost. DbC support does this. It requires user code, but developers should write code for validation with DbC anyway. With DbC support, developers can perform full parameter/return value/state checks. It may be good to have easy syntax for parameter check in precondition check block. function foo($var) { in { int: $var; } // useful code here } Something like this. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net