Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62856 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 516 invoked from network); 6 Sep 2012 09:15:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2012 09:15:08 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:63136] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/71-27906-79968405 for ; Thu, 06 Sep 2012 05:15:04 -0400 Received: by pbbrp8 with SMTP id rp8so2313725pbb.29 for ; Thu, 06 Sep 2012 02:15:01 -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=+PbiTTGrZ1d9roVLtCEwYxNpwKuGofKiAX6M01u+T/A=; b=T4B0/GWoMEY8WimVWuo3WM1Ps5bCpVqBkyfhAEm/t4fOOBVmHWmPL7E+VxjTI/7o0x I6HFEj4wTtt9Z2i6DX5mOL/u0bMv0M+n3KSixVj/ly2Tu33RP7jHx2angGYeBYmgRBy+ HdBcKwc+6ad8UGxRhNwF6H2oTlpYhDrIvl0vQTLTASBWwcPpu2Dn90mKMCyU/pjEyF9O VwhTH+uhP0y2t1ZPG4ecmct7wAMk0lBuTwNYRzX9C44wvWHbTqDtOKcU+MCPRO9nhhQ9 mYYxnxIZA1xneQCDLOsVhuEf9m6KoCuxiJacuuo7wN760Y1EdzJWW7Qeqp1cLQ8JO+Fe F2DA== MIME-Version: 1.0 Received: by 10.66.83.8 with SMTP id m8mr2724316pay.48.1346922900792; Thu, 06 Sep 2012 02:15:00 -0700 (PDT) Received: by 10.68.222.230 with HTTP; Thu, 6 Sep 2012 02:15:00 -0700 (PDT) In-Reply-To: <5048686E.5080800@sugarcrm.com> References: <504836A3.20904@zend.com> <50485647.1060102@hoa-project.net> <50485AA6.4090803@sugarcrm.com> <50486410.4010407@php.net> <5048686E.5080800@sugarcrm.com> Date: Thu, 6 Sep 2012 11:15:00 +0200 Message-ID: To: Stas Malyshev Cc: "internals@lists.php.net" , Sebastian Bergmann Content-Type: multipart/alternative; boundary=f46d042ef4670aa5b104c904ed72 Subject: Re: [PHP-DEV] Moving to an AST-based parsing/compilation process From: tyra3l@gmail.com (Ferenc Kovacs) --f46d042ef4670aa5b104c904ed72 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Sep 6, 2012 at 11:10 AM, Stas Malyshev wrot= e: > Hi! > > > Nikita is doing an amazing job with PHP_Parser, which is such a > > third-party tool. However, it will always lag behind the canonical > > parser. And it will (probably) never match 100% the behavior of the > > canonical parser. > > Wait, so the arguments that it will be amazingly easy to implement new > features in this parser - which should solve the problem of the lag - by > the time the old and clunky parser is released certainly it is possible > to do the same with new, much less complex and much easier to work with > parser? - so these arguments weren't true? Or am I missing some > important reason why parser that is much less complex and easier to add > things to can't do the same old one can do? > > And if it's impossible to match behavior of the existing parser - do I > get it right that the proposed idea is to actually break real code that > people run now in PHP because it was too hard to parse for people that > write add-on tools to PHP? Somehow it does not sound like a good idea. > If we have doubt that we can match the existing PHP behavior then the > idea of changing parser becomes even less appealing, because for 99% of > PHP users it would be pure downside without upsides. The users don't > care if the parser is complex, they care if their code runs. > > > This is why, from my perspective of someone who is interested in stat= ic > > analysis and quality assurance, I think that it would be a tremendous > > boost for the PHP platform if we had a state-of-the-art parser for th= e > > reference implementation of our programming language. > > I think that the benefit of it for regular PHP user is unclear (and > would not be clear until the real benefit of such parser - such as > promised optimizations, etc. - is demonstrated) but the harm from > breaking of the existing code is obvious. What would happen is that > people would just avoid running such PHP version - and what use then > would be to have excellent tools for PHP that people don't use because > it can't run their code? > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > I propose putting together and RFC and a PoC ASAP, and then we can talk about facts instead of opinions and biased views on the topic. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --f46d042ef4670aa5b104c904ed72--