Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83151 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31190 invoked from network); 19 Feb 2015 07:22:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 07:22:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.174 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.174 mail-vc0-f174.google.com Received: from [209.85.220.174] ([209.85.220.174:54404] helo=mail-vc0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/31-22021-32F85E45 for ; Thu, 19 Feb 2015 02:22:12 -0500 Received: by mail-vc0-f174.google.com with SMTP id id10so566391vcb.5 for ; Wed, 18 Feb 2015 23:22:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=zJoOy7/+YJfnuPHq8KysfN+ef6gnzJxdPS5PcMr43dQ=; b=f2IttIjWpY9MZsEtt5lLMrbMRNZ4p26uwQfrNO1kvFxnurSMgtjlkXUZwEH7+N0Os1 4YvfMRmEKA3JzSm9f47H9XvPaPtp2iQU348iZ2Wr2JCWqO/8Rc6ABmYknqrD/P5HEz4R 7a/j/oHEaMEXe/UvaJkdAsocuL5aw0NBRhxc7UVNixqHa7ZNPqwsXtE0GEEwCU6oE9Cg ebuESaQPO6Pbep/NYxuaMgaIoL3lxTbsTwzkwArR/13FI98MbD3j/00PIY/jr5i5xNKN WngRArktt8X2095ZdmHclaRv7hAT14iFI4ewtuv+fNFRLvA6V1FIISv7hLARRbDiYnrX qJKw== X-Gm-Message-State: ALoCoQnz+Iql8kymKgS4w9p2zOkGGSRchVFp+g+ZkMxCmDs//RI6hASRtoIvnO/pAuHgGDhlNCGBe/I/sDcugahqGmMJMyZS5uPSndO98Eo2zaMZq4i0jR/BvSVl5EHGWwLZc/gY2ZCSale2qezMjVzeyF9y78rI+Q== MIME-Version: 1.0 X-Received: by 10.221.18.136 with SMTP id qg8mr1932896vcb.27.1424330529291; Wed, 18 Feb 2015 23:22:09 -0800 (PST) Received: by 10.52.74.73 with HTTP; Wed, 18 Feb 2015 23:22:09 -0800 (PST) In-Reply-To: References: Date: Thu, 19 Feb 2015 11:22:09 +0400 Message-ID: To: Sara Golemon Cc: Nikita Popov , Alexander Lisachenko , Nikita Popov , PHP internals list Content-Type: multipart/alternative; boundary=001a113399e63ddb0c050f6bcb37 Subject: Re: [PHP-DEV] [RFC][Discussion] Parser extension API From: dmitry@zend.com (Dmitry Stogov) --001a113399e63ddb0c050f6bcb37 Content-Type: text/plain; charset=UTF-8 On Thu, Feb 19, 2015 at 8:42 AM, Sara Golemon wrote: > On Wed, Feb 18, 2015 at 11:22 AM, Dmitry Stogov wrote: > > I think the AST API shouldn't use "public" properties. > > Using it, we will have to construct the whole tree of objects, > duplicating > > information from AST. > > I would propose SimpleXML approach instead - construct object only for > > node(s) we currently access. > > > > So at first we will construct just single object referring to AST root. > > Then traversing it we will create and destroy objects for necessary > nodes. > > > I'm not sure if you've seen my astkit extension, but it does this. > > https://github.com/sgolemon/astkit > I didn't see it before, and took just a quick look, but I like it. Any special reason, why you didn't implement ArrayAccess interface for children access? For me it would look natural. Thanks. Dmitry. > > -Sara > --001a113399e63ddb0c050f6bcb37--