Re: Design by Contract

From: Date: Thu, 05 Feb 2015 13:41:02 +0000
Subject: Re: Design by Contract
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-81925@lists.php.net to get a copy of this message
Yeah, this may work. The only problem, that it looks not native and defines additional language for constraints. I don't talk it's wrong. Both approaches may make sense, but of course, we have to select one. Thanks. Dmitry. On Thu, Feb 5, 2015 at 4:19 PM, François Laupretre <francois@tekwire.net> wrote: > Hi Dmitry, > > > De : Dmitry Stogov [mailto:dmitry@zend.com] > > > > Following our conversation, I tried to imagine how DbC should look like > in > > PHP from user perspective. Finally, I was influenced by the semantic > > proposed in D, and syntax proposed for Java. So, these are my initial > > thoughts: > > Please have a look at https://wiki.php.net/rfc/dbc, just the > beginning, > up to 'Pre-conditions'. It contains 2 examples. This is not D syntax, while > functionally similar, because I want to preserve BC and provide built-in > checks on phpdoc declared types. > > Cheers > > François > > >

« previous php.internals (#81925) next »