Re: Consistent function names
| From: | Sean Coates | Date: | Fri, 06 Mar 2015 01:59:20 +0000 |
| Subject: | Re: Consistent function names | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-84373@lists.php.net to get a copy of this message | ||
> If PHP has macro or userspace aliasing!
> This is one possible solution for this.
The engine has support for aliases. See http://php.net/manual/en/internals2.ze1.zendapi.php
If I thought this “consistency” was very important (I do not, and I fully expect an RFC on this
to fail if this thread ever gets to that point), here’s what I would do:
1) map out the entire inconsistency, including existing function names and parameter order, and new
names + parameter orders
2) write a PHP extension that does a whole bunch of ZEND_FALIAS to satisfy this new convention
3) attempt to get others to use this new conventions and the extension
4) once this extension has a few thousand, maybe tens of thousands of users, bring the conversation
back to Internals with some actual evidence that this works and is wanted
#1 will take a long time, and it will be lots of work
#2 is likely very easy once #1 is done (generate the aliasing code)
#3 and #4 are questionable at best, but at least after #2, you’ll have your own unique consistency
(if such a thing can exist)
Until these things happen, I can’t see this gaining any real support from any significant number
of people with commit/merge access (RFC voters).
S