Re: PHP 7 API naming conventions: str vs string
| From: | Levi Morrison | Date: | Mon, 05 Jan 2015 14:18:25 +0000 |
| Subject: | Re: PHP 7 API naming conventions: str vs string | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80173@lists.php.net to get a copy of this message | ||
On Sat, Jan 3, 2015 at 5:57 PM, Sara Golemon <pollita@php.net> wrote:
> On Sat, Jan 3, 2015 at 3:42 PM, Nikita Popov <nikita.ppv@gmail.com> wrote:
>> Or maybe be more explicit and use "cstr" for C strings. (For symmetry the
>> zend_string type could become zstr.)
>>
> I personally prefer cstr/zstr for explicitness, but agree that the
> main focus should be consistency.
>
> -Sara
>
> And yes, the fact that smart_string deals with char* while smart_str
> deals with zstring, but smart_str used to be the char* API. That's a
> big bucket of clown.
I favor 'zstr' and 'cstr' over something like 'str' and
'string'.
Perhaps zend_zstr_ would seem a bit redundant (zend zend string) but
better than ambiguity and having to look it up.