Re: [RFC] Simplified Array API for extensions

From: Date: Thu, 04 Apr 2013 05:40:05 +0000
Subject: Re: [RFC] Simplified Array API for extensions
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-66935@lists.php.net to get a copy of this message
On 04/04/2013 04:09 AM, Sara Golemon wrote:
A logical extension of this idea would be to drop _array_ and cover objects too, one uniform everything API is very appealing, and way easier to document properly.
https://gist.github.com/krakjoe/5304945 I'd be happy to complete/test it if we think it's a worthy direction to go in ... a unified api does look delicious, it's a bit more complex than arrays but then in extensions you want/need to deal with objects as much as, if note more than, you do arrays ...
While I'm in favor of an API which covers both Arrays and Object properties, I don't want to go too far in the direction of generically named APIs. php_exists() is, I think, too far. I'm not sure what's the right middle-ground of being both descriptive and concise, but I'm sure we can sort that out. Morning,
Yeah maybe a bit far, php_exists doesn't really have any context ... I'm all in favour of php_object_exists php_array_exists both having the exact same prototypes and sharing documentation, it just seems a waste to write _object_/_array_ at all ... Any other ideas, or just go with _object_/_array_ ? Joe

« previous php.internals (#66935) next »