Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81926 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92145 invoked from network); 5 Feb 2015 13:48:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 13:48:45 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.172 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.172 mail-vc0-f172.google.com Received: from [209.85.220.172] ([209.85.220.172:54985] helo=mail-vc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/FC-27691-DB473D45 for ; Thu, 05 Feb 2015 08:48:45 -0500 Received: by mail-vc0-f172.google.com with SMTP id le20so2705675vcb.3 for ; Thu, 05 Feb 2015 05:48:42 -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=QeBzogmoy9DSlmE7FwnYmSaYRZduuAsp3bpVcdY+kEk=; b=cQDhIEtiJ0qtm8DDLMh5gCRvYMwblIMrvhINJ/1vjHWrn9kTCZwD0RbnkDXgvSvFDx X4jDQNuZFYOyoRyDPt20zN+WiQ9cFJrXPZwwYw9Qt5WYSi36hYpkSk3afZHvmxon4Dxp ZqVgpOUIcx5o3dgqg/EoHac5vKTnClYKHjt1OA5aj2ZSZRNn1z6FcPmtH3Y+LK3pED+T vkHicoI92GInwX04KDo525SazfeE56ZT5pR1Rr+OhZ2q4L08Hso+FBrTEYXtEW+xwjC5 Mj0tbA4r5KbiJVoc1s0HYoOgZPMp3krOgWnq+8reNBvF5f5Lt4FYDNcPlBTmTJiYpNGc Omsg== X-Gm-Message-State: ALoCoQnWAATfrxP3kxoQCpYj1ySLZjAecXtIEla9QE2UmBa0/MQQF/qpEr0F/YkBKqRvTUucSZVttpPokBOA2QOOLRtLEcyoK5ihaTN78JZhGbDC2o3KV34gdgRmyur7eaaipoSHPK9nHqMsHn2Af6qlWXHH6ZHQrQ== MIME-Version: 1.0 X-Received: by 10.52.26.110 with SMTP id k14mr1674275vdg.65.1423144122830; Thu, 05 Feb 2015 05:48:42 -0800 (PST) Received: by 10.52.74.73 with HTTP; Thu, 5 Feb 2015 05:48:42 -0800 (PST) In-Reply-To: References: <7740874.yAST26hVNS@rofl> Date: Thu, 5 Feb 2015 17:48:42 +0400 Message-ID: To: Alexander Lisachenko , Nikita Popov Cc: Patrick Schaaf , PHP internals list , Yasuo Ohgaki Content-Type: multipart/alternative; boundary=20cf307d0482e7d4ff050e578fab Subject: Re: [PHP-DEV] Design by Contract From: dmitry@zend.com (Dmitry Stogov) --20cf307d0482e7d4ff050e578fab Content-Type: text/plain; charset=UTF-8 php-ast is not almost the same, but it may be extended. Thanks. Dmitry. On Thu, Feb 5, 2015 at 4:34 PM, Alexander Lisachenko < lisachenko.it@gmail.com> wrote: > > 2015-02-05 16:07 GMT+03:00 Dmitry Stogov : > >> In general it's should be possible to provide PHP API to manipulate with >> AST and write compiler extensions in PHP. >> Looks promising.. :) >> Anyway, If you are interested - start working on it. > > > > Actually, it's almost done by Nikita Popov: > https://github.com/nikic/php-ast. Missing part is to put this extension > into PHP core, create an interface for hooks and then give PHP hooks a > control during parsing of source code. > > So maybe just make a vote to include this API into core? This will give a > lot of food for thoughts and implementations of AOP, DbC, SQL-like native > syntax and much more. From PHP Core developers it will be only the > implementation, all other things can be easily extended by userland > developers. > --20cf307d0482e7d4ff050e578fab--