Re: Design by Contract

From: Date: Wed, 11 Feb 2015 13:27:36 +0000
Subject: Re: Design by Contract
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-82475@lists.php.net to get a copy of this message
2015-02-11 13:25 GMT+02:00 Dmitry Stogov <dmitry@zend.com>: > > yes. some special attributes. requires/ensures/invariant > > >> Oh, and <<>> syntax is *ugly* ;) >> > > It's from HHVM. I don't like it as well, please, propose the better one. > I like syntax, like a switch: function add(int $a, int $b) : int case $a > 0: case $b > 0: return($ret, $ret > 0, "something wrong") { return $a + $b; }

« previous php.internals (#82475) next »