Re: PHP 7 API naming conventions: str vs string

From: Date: Sat, 03 Jan 2015 23:46:15 +0000
Subject: Re: PHP 7 API naming conventions: str vs string
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-80130@lists.php.net to get a copy of this message
Hey Nikita, > On 3 Jan 2015, at 23:42, Nikita Popov <nikita.ppv@gmail.com> wrote: > > Basically if you have two APIs, one using str, the other using string, you > can't tell which one is for C strings and which one is for zend_strings. It > could be either way. > > It would be nice to have a convention for this and stick with it. E.g. > "string" is for zend_strings and "str" for C strings. > > Or maybe be more explicit and use "cstr" for C strings. (For symmetry the > zend_string type could become zstr.) The abbreviation seems rather pointless, I’d rather string over str. I’d suggest this convention: * Use “string” or omit the suffix for zend_string * Use “cstring” for C strings (char*) * Don’t use “str” That sound good? -- Andrea Faulds http://ajf.me/

« previous php.internals (#80130) next »