Hi!

> Well, how about renaming the functions, create aliases for BC and throw
> E_DEPRECATED or E_STRICT on their usage? And write a PEAR script bundled
> with the distribution to migrate to the new convention?

Well, the problem with these things is this: suppose you have testing
suite that verifies your code. What you do with E_DEPRECATED? You can
treat them as failure, and that means in hypothetical PHP 6 release you
code is broken, and you can't release it until you fixed it - so that
means for you the effect it as if the function was effectively removed.
On the other hand, you can ignore it - and then when these functions are
removed, you get all your code broken, and while it is not removed, it's
like we didn't do anything.

The purpose of deprecation is to give you time to upgrade your code, but
the question here is - why would you want to change your perfectly
working code, if there would be no benefit to you but couple of
underscored placed here and there so people could feel better knowing
every function has underscore in the same place? As I said, while it's
nice, I don't think it is worth it. When the change is necessary - e.g.,
when we have API that is flawed or unsafe, take the recent example of
CURL file uploading API, which exposes tricky security issues - then
deprecation/removal may be warranted, because your code, that you think
is working, might in fact have security hole. So we find that avoiding
security hole is more important. But I personally do not see how adding
underscores is as important.

If somebody came forward and proposed better API - that could exist in
parallel with current one, but eventually replace it if people like it
so much nobody would use the old one anymore - it could be discussed.
But just shuffling couple of underscores here and there - really, I
don't see how it is worth the trouble.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to