On 2 April 2015 01:36:40 GMT+01:00, Stanislav Malyshev <smalys...@gmail.com> wrote: >> Would that be considered to be bad style? If so, where is it >documented? > >Yes. It is common sense. Not everything has to be spelled out to be >true, and I think rule lawyering and ignoring common sense is not going >to help anybody here. If you don't understand that adding preg_* >function in global namespace that looks like existing core function is >a >bad idea, maybe some mentorship by more experienced developer is in >order.
I think you go much too far here: yes, adding a function designed to look like a core one should be considered carefully, but I don't think it's "insane" or a sign that a user "needs mentoring by someone more experienced". It's equally "common sense" to assume that if I look at the manual and it says a function doesn't exist in PHP 5.6, it will continue to not exist unless I adopt a new version. If I then run "apt-get upgrade" and find (as you have expressed a wish for) that it brings in a new patch version of PHP, I'm unlikely to think of this as "adopting a new version of PHP". I think surprise at finding a whole new function conflicting with mine would be a perfectly sane reaction. Now, as I've said before, I think the compromise of allowing such additions in the current stable branch is probably sensible. But justifying this by insulting users who don't think of the global namespace as reserved is not helpful. The fact is there is no (used) reserved namespace in PHP; if we can remedy that, this whole line of argument becomes moot. Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php