Hi Alexander,

> De : Alexander Lisachenko [mailto:lisachenko...@gmail.com]
> 
> This is built on top of reflection+annotation+parser extension.
> Why not to implement this for PHP? From my point of view, this is just an
> additional feature, that can be used by limited number of developers.

I like the idea. IMO, DbC directives should be defined outside of function 
body. I proposed doc blocks because it exists and is already parsed but a 
generic syntax for annotations along with a full API to interact with 
extensions would be much better.

Most important : if we define that, for example, everything outside of a 
class/function enclosed in [], is an annotation, it is easy to enhance PHP 5 to 
ignore such syntax, without having to backport the whole feature. So, people 
can start using it for PHP 7 and keep the possibility to run their code under 
PHP 5. That's something that would be much harder with the current dbc2 
proposal.

I will modify my RFC (https://wiki.php.net/rfc/dbc) to open it to any sort of 
annotations.

Do you think you have enough time to write something in due time ? Ask for help 
if you need.

Regards

François





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to