> On 4 Nov 2014, at 21:31, Stas Malyshev <smalys...@sugarcrm.com> wrote: > >> This brings the next piece of the puzzle. We have to update lexical and >> semantical understanding of PHP. Taking Java's approach (@) does not >> work in PHP, because it conflicts with error supression. Same thing > > Except for the mental context, how @ conflicts with errors? Suppression > is always in runtime context and applied to expressions, annotations are > always outside of it and apply to declarations. Unless of course you > want to annotate variables and closures, but I'm not sure annotating > expressions is such a good idea anyway
At the top-level, @ is a shift/reduce conflict due to ambiguity between statement annotation and expression. Though it might be possible to work around that with the AST (ew). -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php