Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103632 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 42247 invoked from network); 24 Dec 2018 17:19:49 -0000 Received: from unknown (HELO mout.gmx.net) (212.227.15.19) by pb1.pair.com with SMTP; 24 Dec 2018 17:19:49 -0000 Received: from [192.168.2.103] ([91.8.175.134]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lj1Cw-1hELT73v38-00dEob; Mon, 24 Dec 2018 14:50:08 +0100 To: Dmitry Stogov , Nikita Popov Cc: PHP internals References: Message-ID: <8811ec53-2473-ddb3-5642-bb8dc88edb72@gmx.de> Date: Mon, 24 Dec 2018 14:50:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Ofvqs8sKjYE1kCXe/wNZ5XSD5T5yjhfZSmOPIEOEnHmhw2bQTML Efz2I5AnGbtnUA2vu4FAJWAufDPIQbP58F4ZVD1EZsmv9Fh79nbTSWUAc/xd/kHPUuEooQ2 JKTfQdo53MhCRmxp7xB5sum22p5q4Cn2sMECZHpX9LiC6cwyu0UWBpFPA/UouFQnpKx8HIQ 54PDDcgM/rITE9K0BQsEw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:PgAq417SQk0=:FfcNh4pa5SfuDWRn/PSPp4 pqrL0HzhzCmwA/hGtt84XxvElNDQMkB2on3SqXBXcHl+lj30ZPOGnReCiuoQDby1P8Ow5Gixl DwqIVgGpzBoSnrTnTIAc4zyQ4Z7TpIDBsNxFADvDYtyK3oHPqyx5Zz0IMG7Br7d8YQyLzuFs5 Gaa0AI9jWl6vHqGu1fh96s2IpugADyT68cFlX9K4RNPmsxJ0N7S4O9co9meTU76wl46W5gg16 bkrzlG2bo2itJ5zF4lNGwKQlMbuuJ7msTOYLbTJtYRK2CJ6vnU0AONqaK+B0kemme5OmJRDmy 1RZF4aZbxRysprxUCLNYh0ZRpCR3yM/NE9WL+ZyjIHVzeoVIq0rhPQD86sD+DEIgKTF2bKiJo ByscbFJ14Fziz5dz1M56Epw1KucT1mohPCK4kivD4RLXQEDTY9cOKpLUzMb5Hx0w1Oc5l7XS1 XoXHOgl8EtuHYpNSFgqorfKBDRmieFpb6iQYpSeo21/IeUVHqHzdNzY6JeERzl8X9jT4fYfak Ip3san+XGSDnLHN8C1KCai00NoyZJNNZ1IuPPJw61RS4xGKMpD/+L65rx8UHOmUAjEA0rikur a3CEsXeb84RWp0FHJQStE3VNEfJx6qHMXyBkwFey1+GlBHIbSammodmIC0pIHv8OIDHllftyT xzKZN+BPkgfxolLWrW/6gR1M6sfG5TkyCij+Opc0V9YMyfpCFdnugDNzhVZGxX3kWtc7RuIvV U9ibRXWWfcFhaamJTGICuvpqB28Cv4qa/qWhm+Ef3L3TNn3mQ7LncHcB7C5DSsxLGS9Cnkrlt 0vWLwet2ZmfmWzBN0ce9LZi6Qr9IE1K1wR88/4w6npzdB5c/CokXISAJ+LsGyAE0zLCSIdHUq YfDPJG9ori/ACEPZ/eOYDlnmLDgw3VNuZbxWx1RkWK5+DH9DvQ30MpOc21YpMa Subject: Re: [PHP-DEV] [RFC] [VOTE] FFI - Foreign Function Interface From: cmbecker69@gmx.de ("Christoph M. Becker") On 24.12.2018 at 08:38, Dmitry Stogov wrote: > On 12/22/18 1:32 PM, Nikita Popov wrote: > >> My main concern here is that this is a very new extension and I think >> that apart from you barely anyone had a chance to actually implement >> something based on it and gain experience using the proposed API. >> Bundling an extension with PHP means that the API becomes frozen in time >> and it becomes very hard to change anything. >> I think that having FFI support is important, but I'm afraid that once >> we bundle this extension and it will see more usage, it will quickly >> turn out that the API needs to change to make it easier to use or >> accommodate more use-cases. > > The API almost completely repeats LuaJIT and Python CFFI (that are > stable). Something might need to be improved, of course, but only in > case the extension is going to be widely used. If we are concerned about the API stability, we could mark the extension as experimental and exempt it from our usual BC guarantee, as suggested by Niklas[1]. On the other hand, if PHP 8 will be next after PHP 7.4, this may not even be necessary. > The main reason, I like to have this in core - future integration with JIT. It seems to me that JIT integration of FFI isn't the whole story, but rather an intermediate step to be able to offer built-in functionality written in PHP in the long run, which could be a huge enhancement. Am I correct? Anyhow, my main concerns regarding the proposal are that people could easily be led into thinking that FFI is *the* new way to interface with external code, rendering classic extensions obsolete, and that interfacing on the ABI level is even more error-prone than interfacing on the C API level. Both concerns could be alleviated by good documentation, though. [1] -- Christoph M. Becker