Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85758 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47917 invoked from network); 9 Apr 2015 15:16:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2015 15:16:59 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.43 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.215.43 mail-la0-f43.google.com Received: from [209.85.215.43] ([209.85.215.43:36402] helo=mail-la0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/72-31311-AE796255 for ; Thu, 09 Apr 2015 11:16:59 -0400 Received: by lagv1 with SMTP id v1so92053623lag.3 for ; Thu, 09 Apr 2015 08:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=f8GbEumRzUg54KQzprMgEn7HFgyuL+2hmrmIAFM2rDk=; b=CoUsCJ66SsI6MteffuBsXVnxDGwFHEZuAauEIz+GvZnXuPWGHu1aJYLdonBjO0oJkL /ZbkRXPBIYQSnmWkjFjhqXeqnZJxSf61Rp7rYgcir+BoK3wY+1CEmr6LNKH1tG12RFUE 5X26U5FEYHKbFRKl6qNQfOjmAZ0iEGGdScLydS3w8ICzvgolCyUZ7Y6eXCJ2h6gd9b0D sNglPDYFeGYBbllJ8ICSqsZ/W9aMYi4CPHxSBTRrQGHvaBE6QUbp8cG+Ux8FXhwfSMIo fHZ1W6x1WzFLY88bkNAo+3xEuCk/JPTEToUdmk3IxeQvhdGOhDAuLZEBFr2vPEyMVw2G 0aRg== MIME-Version: 1.0 X-Received: by 10.152.203.134 with SMTP id kq6mr4914668lac.110.1428592615676; Thu, 09 Apr 2015 08:16:55 -0700 (PDT) Received: by 10.25.90.75 with HTTP; Thu, 9 Apr 2015 08:16:55 -0700 (PDT) Received: by 10.25.90.75 with HTTP; Thu, 9 Apr 2015 08:16:55 -0700 (PDT) In-Reply-To: <004801d072cf$b4f69500$1ee3bf00$@php.net> References: <004801d072cf$b4f69500$1ee3bf00$@php.net> Date: Thu, 9 Apr 2015 11:16:55 -0400 Message-ID: To: francois@php.net Cc: jpauli , Andi Gutmans , internals@lists.php.net, Dmitry Stogov Content-Type: multipart/alternative; boundary=001a113478ec62e1fb05134c23e7 Subject: RE: [PHP-DEV] Concern around growing complexity in engine - hash table specifically From: ircmaxell@gmail.com (Anthony Ferrara) --001a113478ec62e1fb05134c23e7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Fancois, On Apr 9, 2015 10:16 AM, "Fran=C3=A7ois Laupretre" wrote= : > > > 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. We already have one. The public API defined in zend_hash.h (all methods and macros not prefixed with "_"). And my argument would be if code outside of zend_hash.(c|h) needs to access the internal hash table structure for anything (a public API doesn't serve the needs), then a new macro or API should be introduced for that use-case (so that it doesn't need to access the structure anymore). Anthony --001a113478ec62e1fb05134c23e7--