Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124896 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id C65FD1A00B7 for ; Mon, 12 Aug 2024 17:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723482554; bh=4DPnraRXGetTHKnUkNVZiTJu2tnadBycroOp9DQRkAs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MP3HeneljWouZeWfY4OWKZHc0hz0CYfP8FY0liZjnN6xk6bBx8FaMAWLPtsS4GEtO t/h3Dd+0jjCdUbLKDeiU0lmHZQ5WiOt2X0716gP7Q05QRQQX8t/JGLS12FPdC1Wpqy 6KECizdwZygIbUpx5GW16EbHDlciLk6oc+9zJei8Y4HycD3kyO91QvFWQiwvnIaemm nzQboALJ8Pw2xwrncE+GMLjHpxcBgDBsuR/3Wu2pOwAzBNh+1RUYG+c6dPbT/wJIbG 4gT2WTJG0ZU4Yxnr3W3SBhmtYvT7nBYyDnz1CS7X4mL5Q/gkyqg2mNsyjDQHl413D/ Btcrw5ggPrxDQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AE3A018007C for ; Mon, 12 Aug 2024 17:09:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 12 Aug 2024 17:09:13 +0000 (UTC) Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-5da686531d3so235832eaf.3 for ; Mon, 12 Aug 2024 10:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723482447; x=1724087247; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4DPnraRXGetTHKnUkNVZiTJu2tnadBycroOp9DQRkAs=; b=Vut4AfllGT+lt0gU4gs5QAX3MFttel8t04+VvGHwHRjK3gaCe1CmZum0DCPYE2UWLk gW7y4J56DaWqoke2wR9DIVGwvqDhbEa23SXjnC8Nh5nrhyF8iCfjonynFFYrqIrZ0Vut MGSyJI9jbPBgrx9InnMQS9t6706qTcTnRNOIgQM173NFG5kXY262sLBBN+sthZTU8vbE nL0Wbit9encvZVyJN6pbKEjSE12pTjeCKPmVlocjEWQMW1WE2oFoEyon3/AnKMyRbrGW ctNUWWm1KxoC8fMEebTDbzNpJ7WgRcITUWVS8deQ5nCztC3QJ3ahxF3fNQwUFv1nOQ+F 2rGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723482447; x=1724087247; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4DPnraRXGetTHKnUkNVZiTJu2tnadBycroOp9DQRkAs=; b=i+km8HI5uwJfB+zar5f+i9TG8EzGIEil3POadWtEUMatnPFhuBLslSR7I+VE2W6o1p /CTOA4UP1PyU/q/q01WWjKnNM/mMiHpIHYEI0j2yuiw6ozcLt6Bcm5QH+TFS4h6Mbo6T CDjwi8VSGszGwTchToEhYBIHgLV5IQlb+QOZ3ZNi6BkTxbYgKJ8RJZ+Ls5Qww/ShGXja /t9yy+Gv5yccoa6XYfIiyxwclf0uiUUrFIz0q6iRAjzaDYy7mz1hkdt5O4BtJxhbzcJi GywUJUJ8lW7RXVa0UJjSSWTPftOJCPBC2v543wa4wsdr8n32DfwsijXNoiFgu9dHdLks NcIQ== X-Forwarded-Encrypted: i=1; AJvYcCVgznyJwl9SJE0C2O4iZD1skH/ojBbHwD0va5zbnKhuIORZKvWWKq3LMFQe02xpq1QJTEH6QUrwY0znVBtPRrE5ktvomyEvDw== X-Gm-Message-State: AOJu0YzwSIwLCNTPba1oLvgdQ719fg22Z/pWZ1KHuN8k1nFW+vMhVFB9 JhSDrj6sMcIFDAC4uwF7DZVgOtOHus2ejXbzV++4O93S0p229wyfmS4l28ZSr6oQuvIlouBB6V/ FDVJpWsLTpG30eWgeJms2y5eQ8jM= X-Google-Smtp-Source: AGHT+IGa85W7SrL1FtZ8VASHVD7PEgG/s9JBWWlrkkZ6PkW/u6HjEqDjucHWheNOYg4+CORmnem4cL+8lCfSISzTC+g= X-Received: by 2002:a05:6358:9216:b0:1a8:a886:85ef with SMTP id e5c5f4694b2df-1b19d2b50b2mr129276855d.6.1723482447389; Mon, 12 Aug 2024 10:07:27 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <3F5C5B7F-6EE5-437D-9E4A-4C86EC103E7A@getmailspring.com> In-Reply-To: Date: Mon, 12 Aug 2024 11:07:16 -0600 Message-ID: Subject: Re: [PHP-DEV] [DISCUSSION] C++ Enhancements in Zend API To: Pierre Joye Cc: John Coggeshall , Levi Morrison , PHP internals Content-Type: multipart/alternative; boundary="0000000000000dad84061f7f87f2" From: lnearwaju@gmail.com (Lanre) --0000000000000dad84061f7f87f2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 12, 2024 at 10:50=E2=80=AFAM Pierre Joye = wrote: > > > On Mon, Aug 12, 2024, 11:03=E2=80=AFPM John Coggeshall > wrote: > >> >> > I=E2=80=99m considering adding some C++ enhancements to the Zend API. >> >> >> I would definitely like to see an RFC for this if it was to be >> considered. To me, adding a whole new way of doing things internally >> without completely removing the old way is just asking for a more brittl= e, >> potentially less secure, and harder to maintain codebase. The win of mak= ing >> it easier / "nicer" on a subset of developers who might prefer a C++ >> interface isn't anywhere near worth the risk IMO. >> > > > if anything, I would rather go with rust (zig would have my preference > ;-). The benefits would be to have a significant ease to contribute for > many. > > Neither of c++ or rust would be easy to add. The later would have the hug= e > advantage to bring a little bit more safety to the extensions APIs. > > A less diplomatic answer would be that c++ makes zero sense in 2024 for > php (or any other language), a strong and bold take :) > > best, > Pierre > Lol it's been a long morning, thanks for the laugh. Look through php's source code, do you see any mention of rust or zig? or any references to their compilers? PHP already supports C++20 ( https://github.com/php/php-src/blob/master/build/php_cxx_compile_stdcxx.m4) and has at least one extension implemented in c++. Do you genuinely believe that it makes more sense to add support for a new language (rust/zig) that will require its own compiler (that isn't installed anywhere by default), than to improve support for a language already part of php? Humor me and elaborate on why you think that 'c++ makes zero sense in 2024 for php (or any other language),' Cheers, Lanre. --0000000000000dad84061f7f87f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Aug 12, 2024 at 10:50=E2=80= =AFAM Pierre Joye <pierre.php@gm= ail.com> wrote:


On Mon, Aug 12, 2024, 11:03=E2=80=AFPM John C= oggeshall <john= @coggeshall.org> wrote:

> I=E2=80=99m considering addin= g some C++ enhancements to the Zend API.

I= would definitely like to see an RFC for this if it was to be considered. T= o me, adding a whole new way of doing things internally without completely = removing the old way is just asking for a more brittle, potentially less se= cure, and harder to maintain codebase. The win of making it easier / "= nicer" on a subset of developers who might prefer a C++ interface isn&= #39;t anywhere near worth the risk IMO.


if any= thing, I would rather go with rust (zig would have my preference ;-). The b= enefits would be to have a significant ease to contribute for many.

Neither of c++ or rust would be= easy to add. The later would have the huge advantage to bring a little bit= more safety to the extensions APIs.

A less diplomatic answer would be that c++ makes zero sense in= 2024 for php (or any other language), a strong and bold take :)

best,
Pierr= e

Lol it's been a long morn= ing, thanks for the laugh. Look through php's source code, do you see a= ny mention of rust or zig? or any references to their compilers? PHP alread= y supports C++20 (https://github.com/php/php-src/blob/master/bu= ild/php_cxx_compile_stdcxx.m4) and has at least one extension implement= ed in c++.=C2=A0

Do you genuinely believe that it makes m= ore sense to add support for a new language (rust/zig) that will require it= s own compiler (that isn't installed anywhere by default), than to impr= ove support for a language already part of php?

Hu= mor me and elaborate on why you think that 'c++ makes zero sense in 202= 4 for php (or any other language),'

Cheers,=C2= =A0
Lanre.
--0000000000000dad84061f7f87f2--