Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66935 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49979 invoked from network); 4 Apr 2013 05:40:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Apr 2013 05:40:10 -0000 X-Host-Fingerprint: 86.14.252.140 cpc3-asfd3-2-0-cust139.1-2.cable.virginmedia.com Received: from [86.14.252.140] ([86.14.252.140:14512] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 22/A0-46468-8321D515 for ; Thu, 04 Apr 2013 00:40:09 -0500 Message-ID: <22.A0.46468.8321D515@pb1.pair.com> To: internals@lists.php.net Date: Thu, 04 Apr 2013 06:40:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 References: <515C8670.7030400@php.net> <66.08.07534.A929C515@pb1.pair.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 86.14.252.140 Subject: Re: [PHP-DEV] [RFC] Simplified Array API for extensions From: krakjoe@php.net (Joe Watkins) 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