Re: [RFC] Simplified Array API for extensions
| From: | Sara Golemon | Date: | Thu, 04 Apr 2013 03:09:52 +0000 |
| Subject: | Re: [RFC] Simplified Array API for extensions | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-66931@lists.php.net to get a copy of this message | ||
>> 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.