Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99405 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22583 invoked from network); 6 Jun 2017 15:55:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2017 15:55:50 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.128.172 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.128.172 mail-wr0-f172.google.com Received: from [209.85.128.172] ([209.85.128.172:34252] helo=mail-wr0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/71-27119-680D6395 for ; Tue, 06 Jun 2017 11:55:50 -0400 Received: by mail-wr0-f172.google.com with SMTP id g76so56192007wrd.1 for ; Tue, 06 Jun 2017 08:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9DNdPV3ySlX6xdbBmH2z+4xEBoUzS/b1A58j4Cs9LTQ=; b=k4Qu6IBjgz2dWSEtMgtUek3BQOUwxRlD9gWjWqB5ANPx9PVcWH5WQ51W2zqM8wVNjw tto0PSYYRGYESXJR5UC/ottneWwXNocpkcxN3JnZG9X/Do9ziL2lTvphTUYzQ9IzxMlS T4WyBsF97umh9Nqc5gwA4RUcOPzJyoQJymm3qEV9JQKcVPEHpy3zuAqdWtOW4VCFB8hF Xpwaf2qMyRUepU/PIcvW+cYg56e3+dkKBlQ7ebn6GgzVC6PeAX+a5uLnLpuhbqFCDvbt hiBwLAeIowiyUiRtXZuoRgk+4EHqKXSmj1yjvvjwPifAsLkfKRU2xE39O7EG3opCLj4F Di+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9DNdPV3ySlX6xdbBmH2z+4xEBoUzS/b1A58j4Cs9LTQ=; b=nveWczAC4uODpjfOT7F+pVmyChgqzPrMTRAK5rXDDGF047Xjeh2q3EWLqPAZWMVCjG AZN3TN8ZO3PQQtIcNSgdjHn+OKie1J8hUPnfl9K8C5QZeRMWF+xKyHg2W+Yqk9pg6EMd BIodhGxJP7N2gnn2RpcnSNEqctWVliEH2Qja7FMHNvlQHHMJPu6Me6w7jn28UCwp3ry4 CmgZogurCMlfkpsRwyuJjISYvEbQduXEnYK+DusfiHafw2Lkt5ONFaZIXFJnn1blIQkc lOh3Erq+nmSk/V+D1q+3Gj7csiWNL2+3x7HOkFVZJpS/bgl8obfa0cnRBaOM/nB1Qg2p e6Jg== X-Gm-Message-State: AODbwcAFEzc3ULI6ICin2Z0/tSWQF3iExLq0X0x+qbh+usoaJ9lc0+eQ 2cvqaH2L9rC7/f8DNlZBRMHHRsWKnf2e X-Received: by 10.223.179.199 with SMTP id x7mr20209630wrd.72.1496764547443; Tue, 06 Jun 2017 08:55:47 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.223.169.209 with HTTP; Tue, 6 Jun 2017 08:55:46 -0700 (PDT) X-Originating-IP: [74.113.166.198] In-Reply-To: References: <5313411f-40b4-58c6-83a8-7e813526f2a7@tekwire.net> Date: Tue, 6 Jun 2017 11:55:46 -0400 X-Google-Sender-Auth: fvlf7x-qqcf8yxVjAIpo7ZSRYgo Message-ID: To: Nikita Popov Cc: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Proposing inclusion of PCS in the 7.2 core distribution From: pollita@php.net (Sara Golemon) On Tue, Jun 6, 2017 at 8:43 AM, Nikita Popov wrote: > First of all: I think the ability to implement parts of PHP extensions in > PHP is extremely important and will be a game changer in our ability to > maintain and improve our standard library. > Ditto this. The argument for having a MUCH larger pool of maintainers is #1. The reduced footprint for crash-bugs is a very close #2. > Anyway, to get back to the topic of PCS. First, I would recommend to target > PHP 7.3 for this change. Feature freeze for 7.2 is in a bit over a month > and I think we'll want to make some non-trivial changes to how this works > if we integrate it in PHP. If added to PHP, I think this should be > integrated into the core, rather than being an extension. > As an RM for 7.2 *and* someone who's been daydreaming of something like PCS for awhile, I'm going to second this strongly. I literally cut the alpha1 tag this morning (for Thursday's official release), and something like PCS is pretty significant in its disruptive capacity (not to mention being lower-value until we start actually *moving* some of those extensions to PHP code). Save this for 7.3, please. > 2. It has already been mentioned in the thread, but what seems to lack > right now is a good way of integrating PHP and C portions. As far as I > understand, PCS allows you to write an entire class in PHP, but it does not > allow you to offload parts of the functionality to C without exposing > additional public APIs. I think there are two things we can do here: > > b) Allow binding some methods specified in PHP to an internal > implementation. The way this works in HHVM is that the PHP file contains > just a signature, with an attribute that signifies that an internal > implementation will be bound to that function: > As the author of HNI*, I look forward to iterating on this as a potential design (maybe learning from HNI's experience and making something better), but I regard it as a "version 2" thing. We can get PCS good and stable first, THEN worry about bridging to C later. > This would be useful for other reasons as well. In particular, this could > become a replacement for the existing arginfo-based signature > specification, which is somewhat limited and causes discrepancies with > userland classes. For example, arginfo does not support default values. > 100% this, though PHP's version of HNI will suffer a few shortcomings due to the lack of a type_traits equivalent in C99. I'm not suggesting we go C++11 just to get a better bridge, but it's a real constraint in getting the same advantages that HNI has. TL;DR - This is one giant "Me Too" response. :p -Sara * HHVM Native Interface. i.e. Exactly what Niki just described.