Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85756 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42704 invoked from network); 9 Apr 2015 14:16:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2015 14:16:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:41365] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/A1-31311-BA986255 for ; Thu, 09 Apr 2015 10:16:13 -0400 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id B65954B0188; Thu, 9 Apr 2015 16:13:50 +0200 (CEST) Reply-To: To: "'Anthony Ferrara'" , "'Andi Gutmans'" , , "Dmitry Stogov" Cc: References: In-Reply-To: Date: Thu, 9 Apr 2015 16:16:00 +0200 Message-ID: <004801d072cf$b4f69500$1ee3bf00$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGnmlEGvcR6nSgZYjxcl5s29Bb+UAILXhhVAwNoNtqdbeqjgA== Content-Language: fr X-Antivirus: avast! (VPS 150409-0, 09/04/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] Concern around growing complexity in engine - hash table specifically From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Anthony Ferrara [mailto:ircmaxell@gmail.com] > > If we were using a pure abstraction (only accessing the hash table > information through the public API), then fine because it's isolated. > However, many extensions and even places in core access hash table > structure directly (as can be seen by the updates needed by > https://github.com/php/php- > src/commit/2b42d719084631d255ec7ebb6c2928b9339915c2). > Meaning the complexity isn't encapsulated. IMHO, that's the main problem. If a piece of code is accessed through an = official published API only, its internal complexity can grow, provided = the API still provides the same services. So, the first step should be = to define and publish an 'official' full-featured API. = Phpinternalsbook.com is a fine place for this. The question is what we = do for PHP 5 : do we publish a PHP7-only API ? Do we backport it to 5.6, = 5.5, 5.4 ? Once we have an API, we can fix the code to use it exclusively. One way = I already used to check zval access is through an additional configure = option that modifies the field names in the structure so that any access = outside the API fails at compile time. This can be a valuable tool for = extension developers. If you think the same, I'd be glad to participate. Regards Fran=C3=A7ois