Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81923 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86055 invoked from network); 5 Feb 2015 13:34:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 13:34:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.178 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 74.125.82.178 mail-we0-f178.google.com Received: from [74.125.82.178] ([74.125.82.178:38272] helo=mail-we0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/AB-27691-A6173D45 for ; Thu, 05 Feb 2015 08:34:35 -0500 Received: by mail-we0-f178.google.com with SMTP id k48so7675067wev.9 for ; Thu, 05 Feb 2015 05:34:31 -0800 (PST) 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=42tcCMnMCmV94ObY4I4LbtEgiZcGAmi5V2wc4w/9l9k=; b=X7uDlzBRDWBSc4H7xnRqQNMoEKZm07kmb22ZY1vWDEHYlOjKAmKGuNT/auWOZAaKN3 utvdt9XH6HrSpCKlyazGg6atJbQ35AdSvz9Az7pYL+6LsBq00hYUkKuo7j4UgG8GPYcJ BWiaJ0JKD7332udlz/0nhpHjCNykONnHmQmyG1o8PIoR4D9zS9n7nRsBcRi8WEPIWJsV vOEuelczNbqz8c6pldyd5/9QbI+qQnMZDt/9TP5MZj8xQcM4yuqDlhb0o6AvFx0tbIWs bJVbyPtgmhZIGikK+VRPMnzf18YBB3lknk9NCyN+unubX8qHsq7u6Kgu829nDTrTxGc1 505g== MIME-Version: 1.0 X-Received: by 10.194.77.75 with SMTP id q11mr7874284wjw.116.1423143271507; Thu, 05 Feb 2015 05:34:31 -0800 (PST) Received: by 10.194.154.229 with HTTP; Thu, 5 Feb 2015 05:34:31 -0800 (PST) In-Reply-To: References: <7740874.yAST26hVNS@rofl> Date: Thu, 5 Feb 2015 16:34:31 +0300 Message-ID: To: Dmitry Stogov Cc: Patrick Schaaf , PHP internals list , Yasuo Ohgaki Content-Type: multipart/alternative; boundary=047d7bf0d62c29acb5050e575df5 Subject: Re: [PHP-DEV] Design by Contract From: lisachenko.it@gmail.com (Alexander Lisachenko) --047d7bf0d62c29acb5050e575df5 Content-Type: text/plain; charset=UTF-8 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. --047d7bf0d62c29acb5050e575df5--