Re: ext/filter, Final API proposal
| From: | Pierre | Date: | Sat, 16 Sep 2006 17:46:13 +0000 |
| Subject: | Re: ext/filter, Final API proposal | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25739@lists.php.net to get a copy of this message | ||
Hello,
On 9/16/06, Dan Scott <denials@gmail.com> wrote:
On 16/09/06, Ilia Alshanetsky <ilia@prohost.org> wrote: On 16-Sep-06, at 11:35 AM, Dan Scott wrote:It should be something_to_something, not something_something. "is it id_to_filter or id_filter?", no, I'm not going to ask me this question in the next few years. Also it is not a ID but its name, its ID is internal, numeric and defined by a constant. name_to_filter reflects this fact, we can use name_to_id if you prefer, but not id_to_filter. However, that's nitpicking, you will use this function once a month for debugging/testing/abstraction purposes. input_filters_list or input_list_filters, I don't care, please choose one :) --PierreMinor: the general structure of the function names are <prefix>_<verb>_<noun>, so it would be more consistent if this was 'input_list_filters'. Overall: +1 (with bonus points if you go with <prefix>_<verb>_<noun> for the two identified cases)I for one think we should try to keep the names of something that (hopefully) will be used often as short possible to reduce the likely hood of typos. Ilia Alshanetsky Agreed. input_id_filter() is shorter than input_name_to_filter(), and input_list_filters() is the same length as input_filters_list().