Re: _

From: Date: Tue, 11 Sep 2001 02:54:54 +0000
Subject: Re: _
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-65738@lists.php.net to get a copy of this message
At 03:42 11-09-01, Egon Schmid wrote:
The _() alias is no function. If someone build-in gettext, he or she should read the gettext documentation. The manual can be only a better function reference and if every alias would have a description just like the real functions, newbies will never find the functions to use. So let the aliases mentioned at the pages where the real functions are described. Look at http://php.net/mysql functions to get the point. There are many old function names, which cannot deprecated, because this functions are now aliases.
Egon, There's absolutely no difference between aliases and functions from an end user's point of view. There's even no different from a low-level C perspective. You could have function foo and bar aliased to it, and function bar with function foo aliased to it, which is an identical situation. The only reason we have the 'FALIAS' macros is because we want to be able to use the same C implementation for different PHP function names. What's the point of this? Simple - end users of PHP simply should not and do not care about whether there's a FUNCTION or an FALIAS in the C source code. It walks like a function, it barks like a function, it's a function. If it's not deprecated, it should be documented. Because the _ magic is apparently not being deprecated, as much as I hate it, it should be documented. You should understand that the manual isn't always used the way you described. My guess is that it's not even *usually* used that way. It's a reference manual, rather than reading material. At any rate, it should provide a reference manual to those who read and maintain code, not only those who develop it initially. Right now, it fails as far as _ goes. Zeev

« previous php.dev (#65738) next »