Re: [PHP-DEV] PHP 7 API naming conventions: str vs string

2015-01-19 Thread François Laupretre
Hi, On Sun, Jan 4, 2015 at 1:57 AM, Sara Golemon wrote: > On Sat, Jan 3, 2015 at 3:42 PM, Nikita Popov 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 th

Re: [PHP-DEV] PHP 7 API naming conventions: str vs string

2015-01-05 Thread Julien Pauli
On Sun, Jan 4, 2015 at 1:57 AM, Sara Golemon wrote: > On Sat, Jan 3, 2015 at 3:42 PM, Nikita Popov 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 th

Re: [PHP-DEV] PHP 7 API naming conventions: str vs string

2015-01-05 Thread Levi Morrison
On Sat, Jan 3, 2015 at 5:57 PM, Sara Golemon wrote: > On Sat, Jan 3, 2015 at 3:42 PM, Nikita Popov 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 >

Re: [PHP-DEV] PHP 7 API naming conventions: str vs string

2015-01-03 Thread Sara Golemon
On Sat, Jan 3, 2015 at 3:42 PM, Nikita Popov 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 th

Re: [PHP-DEV] PHP 7 API naming conventions: str vs string

2015-01-03 Thread Andrea Faulds
Hey Nikita, > On 3 Jan 2015, at 23:42, Nikita Popov 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 s

[PHP-DEV] PHP 7 API naming conventions: str vs string

2015-01-03 Thread Nikita Popov
Hi internals! PHP 7 uses two different string types. One is the ordinary C string char*, the other is a custom zend_string* structure, which additionally embeds length and GC info. We currently have a bunch of APIs that accept either C strings or zend_strings, but the naming is pretty much random