annotations might be useful for DbC, but I doubt if they are more readable.
<<reguire(is_numeric($a) && $a > 0)>> <<reguire(is_numeric($b) && $b > 0)>> <<ensure($ret > 0)>> function foo ($a, $b) { return $a + $b; } Also, to use them, we will have to develop them first (not a trivial task as well), but may be this is a right road. Thanks. Dmitry. On Fri, Feb 6, 2015 at 7:00 AM, Pierre Joye <pierre....@gmail.com> wrote: > On Thu, Feb 5, 2015 at 11:36 PM, Dmitry Stogov <dmi...@zend.com> wrote: > > phpdoc is annotation as well, but to split it into specific attributes we > > have to write specialized parsers. > > Other languages support annotation or attributes that may be used more > > easily. > > > > http://docs.hhvm.com/manual/en/hack.attributes.php > > Exactly, phpdoc is used as annotation (or comments with some similar > syntax) but is definitively not aimed to be annotations. > > -- > Pierre > > @pierrejoye | http://www.libgd.org >