Le 19/02/2015 10:09, Joe Watkins a écrit :

The expectations RFC is now in voting phase:
  https://wiki.php.net/rfc/expectations#vote


Hi,

While talking about this RFC with other people of AFUP, we discussed about assert()... And mostly ended up against "it".

Still, note we probably discussed more about the idea of using assert() itself than about the RFC and the proposition of improving the existing assert() construct -- which means we probably didn't really answer the question that was asked here.


Basically, the idea of adding code (assertions) directly into the code of our application in order to test for "things" doesn't feel right: we'd rather use (unit-)tests for that, alongside our application's code and not interleaved with it.

Considering this, we kind of felt it wasn't really necessary to work on assertions and that enhancing them might encourage people to use them more -- adding more non-production code in the middle of the production-code.


Also, using .ini directives to enable or disable the execution of portions of code comes with a risk: there is always a chance someone will mis-configure a server and assertions will run in production environment. Or maybe in some edge cases, an assertion could have some side-effect that would impact the code (even if it should not), making it work in development and not work in production?


I hope I summarized our thoughts right -- and sorry if we didn't really answer the question that was asked.

Thanks for your work!

--
Pascal MARTIN, AFUP - French UG
http://php-internals.afup.org/

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

Reply via email to