Suggestion for 'deprecate' mechanism as in Java

From: Date: Thu, 09 Mar 2000 20:20:33 +0000
Subject: Suggestion for 'deprecate' mechanism as in Java
Groups: php.version4 
Request: Send a blank email to php-version4+get-11816@lists.php.net to get a copy of this message
As PHP evolves there are sometimes functions (and maybe features) from the past that one doesn't want to or isn't able to provide forever (as in any other evolving language or library) my private favorite for a dont-want-to-see-it-any-longer function would be imap_headers() with its fixed string layout hardly suitable for any other application than the one it was originaly created for other candidates could be the non-odbc adabas interface but how to communicate thees changes? just dropping them out of the manual and lateron from the code ? what about some mechanismn like the 'deprecate' keyword in java combined with an additional error-reporting level ? this would make it possible for functions no longer wanted to issue warnings that they may be no longer available in the future and maybe another similar mechanismn and warning level for functions that are not yet ready aka. 'experimental' and as such may be subject to changes in the near future although they are presumably there to stay this is by now only an idea, not an implementation plan but personaly i would do it by #defining to macros PHP_DEPRECATED and PHP_EXPERIMENTAL that take two parameters - a version string and a short comment - to trigger the warning messages in the log if enabled looks like an inexpensive solution: simple implementation and not much of a performance loss (it ain't prime time functions that would suffer from this anyway) or no loss at all if disabled by configure defining the macros to noops for those who don't care (although this shouldn't be default) comments? -- Hartmut Holzgraefe hartmut@six.de http://www.six.de Besuchen Sie Six auf der Hannover-Messe (20.-25.3.) in Halle 14, Stand J50!

« previous php.version4 (#11816) next »