Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124905 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 66A861A00B7 for ; Mon, 12 Aug 2024 20:12:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1723493625; bh=GS3zQTWGeWu843/gQFD/+l1DGE/4bd0R7cf0NFU7zcg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XE6PZ9dOtsRu9MQ7ODoLkHWt/Gp8ZLTkjUJ+LjZWeh/a9wkM6EhE811igiLmFgznP UCGOjbgURz3Bz3Jk9bMPORtHsj1QtIV8AoN4XV1Jz+bCDl3CvBtBfL/FkB41Bf63Lu hz2bUVyoSkN23Y7TODdtizJaHxLeXW+ZSvnQT4p+aIsCzdE7iGb/AU7XdgEiSHvKbB cjHLxorTaD6ZFe4CXr9x7jY2ur3Y0eUj3ip31m25ZFpeGY3PV6YEjYBlNkHVE+Ngyu ZKkjNSQDgKvIVn19rv2VZ0DxTAh0GBtHbIohPnGDM9uqVsJaZTkG3j6OcR5ST4Gp8W KZ1otCcr5rmqg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 73B1018006F for ; Mon, 12 Aug 2024 20:13:44 +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_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com [209.85.217.49]) (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 20:13:43 +0000 (UTC) Received: by mail-vs1-f49.google.com with SMTP id ada2fe7eead31-4929992a5e2so1244739137.2 for ; Mon, 12 Aug 2024 13:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723493518; x=1724098318; 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=hzTUxnXna7r53/jav564EZw105Ae41tdzmG2xhTeisk=; b=hSdBksHPNnwietHTE1a5t9edMYzqwrdEPN/auNswUPRn5Sk7oflzLdwS1r68VA9t1G xHTRrpjXTx67nBSs+qEOU2qS6xA0S8VILiU1jXIUWEzcxWEl79T31kt7tMLXGKOweSo3 SCZlMXKkT3GWt8BnV+k5hAT1c8HBdB+CGU/u/HAo8Mcm27R5WKhYCtOiahnCryR7N25P GVUXYWb+Rw+ywV7Gfzm5bSUkmt/QEDjXuBMM5sGl8tlBL3QlELVGhaNueuorBKucvMFF XajJGbZmp/QnW9sgSA25yMV7/LUhKZEnqtvaTZikEcEwQ6YSwCmvGU32qwN4w55Qjtri Xu1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723493518; x=1724098318; 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=hzTUxnXna7r53/jav564EZw105Ae41tdzmG2xhTeisk=; b=TB+Q+ZbA4iEdquwvuUoJGxUZ1szk3kJ+djd4Bwg0DSP4G5xO2QKBSIJp0lEbirOf2Q k50CiehP4Z6br4ZY9Cl8RbWAcB4jMbV/mFAm1bPu4mefFD0obH05IqP7ynB9n4u+G5eQ nUrgmmHFDILTr1N0NZ40nMwJUD5oBt9nT5D4wvz2U87iRCLqu82+vXV7jFVKta40HnHy aYtj1ectPr1nb1wk7dwmh5cQpHRPJGZw9+g3XhBbtFVzWuc6znplmqg9IvR1fqL5Rr8L s2UJApW9PAjrp9A/MMT8iEfEg7iBeHS5SOX9hYc+TP2xUv/qhCWWNRqUYfaNZTo3cvlz MOMA== X-Forwarded-Encrypted: i=1; AJvYcCWAobCjvAk/sllF98EE/VB8QbylGItM4AbGriUrKVGohE6qbRZwl2SaqL4XnRU0kbfFmMUy6XY5OMns/rXdd6uJ2Zm8EL4lHQ== X-Gm-Message-State: AOJu0YzLlF+koZhRRMqFIyLaB8SwgsKFQuORYnG9f7hGU6JqajvCZ7OF Mn/fmHFms6hLE0rs3++4DrdUefXT+3Ldia0x4XS+FGBFPAESyzx04tqiJPZ2pQZ5jhye0lKmH54 qSwr9fhtMmah0l1jxCopWyAXWidg= X-Google-Smtp-Source: AGHT+IG6EAGWpKRPXlfeXK3emb9c2hDIb9ycEG8DgVWnbX1RotwWGkUOt7kaCgEImF6kZUAFdAUyT1z5mUjf3xWSbOU= X-Received: by 2002:a05:6102:b13:b0:492:aa19:dcf9 with SMTP id ada2fe7eead31-49743942f38mr1810465137.6.1723493518227; Mon, 12 Aug 2024 13:11:58 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <89C901BF-DCEA-498E-93B0-750C49E6275B@getmailspring.com> In-Reply-To: <89C901BF-DCEA-498E-93B0-750C49E6275B@getmailspring.com> Date: Mon, 12 Aug 2024 14:11:47 -0600 Message-ID: Subject: Re: [PHP-DEV] [DISCUSSION] C++ Enhancements in Zend API To: John Coggeshall Cc: Levi Morrison , PHP internals Content-Type: multipart/alternative; boundary="000000000000ed41b0061f821aee" From: lnearwaju@gmail.com (Lanre) --000000000000ed41b0061f821aee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 12, 2024 at 1:36=E2=80=AFPM John Coggeshall wrote: > lol. Listen friend, I've been involved in PHP internals on and off for > over 20 years -- and so has Pierre. You'd do well to respond with a littl= e > more consideration instead of flying off the handle calling us ignorant > rust developers lol. > > The idea of enhancing support for C++ makes no sense. It's a waste of tim= e > and energy. The entire industry is actively trying to to move AWAY from > C/C++ in general, not to mention someone has to maintain it after you get > bored insulting people here and move on. This is doubly true when the > benefit is a handful of people who want to might write some extension in > C++. > > On Aug 12 2024, at 2:59 pm, Lanre wrote: > > > I didn=E2=80=99t realize this was an open mic for Rust devs to flaunt the= ir > ignorance, but since you=E2=80=99ve decided to chime in, let me spell it = out for > you. Rust has absolutely nothing to do with this discussion, so try to st= ay > on topic. Nowhere did I mention a move to C++; perhaps reading > comprehension isn=E2=80=99t your strong suit. > > > PHP already supports C++ for extensions, as evidenced by the intl > extension. The current support is painfully basic, which forces developer= s > to waste time on redundant wrappers or use third-party libraries like > PHP-CPP. What I=E2=80=99m proposing is a way to improve this support so C= ++ devs > don=E2=80=99t have to keep doing the same menial work over and over again= . > > All of this will be wrapped in macros, so C compilers won=E2=80=99t even = notice > the compatibility layer and will compile as usual. It=E2=80=99s a simple,= elegant > solution=E2=80=94something you might not be familiar with, given your aff= inity for > Rust=E2=80=99s convoluted approach to everything. > > Cheers, > Lanre. > > It=E2=80=99s impressive that you=E2=80=99ve been involved with PHP internal= s, but it=E2=80=99s clear you haven=E2=80=99t a clue about what I=E2=80=99m proposing and are c= ontributing nothing of value. You=E2=80=99d have to be seriously naive to believe that = =E2=80=9Cthe entire industry is actively trying to move AWAY from C/C++.=E2=80=9D The fact is, C is still the backbone of nearly everything. If you=E2=80=99r= e building anything that interacts with an OS or embedded device, you=E2=80= =99re either writing in C/C++ (C++ for Windows) or working with some C wrapper. Rust=E2=80=99s approach to low-level implementation is laughable unless you= =E2=80=99re prepared to abuse unsafe or use Cranelift. Even simple things like JIT optimizations are considered unsafe in Rust. Swift, which is heavily used in macOS, is essentially an LLVM wrapper=E2=80=94meaning it relies on C++. The recent advancements in Swift= =E2=80=99s interop with C++ highlight just how crucial C++ remains. Then there's Adobe apps, Microsoft products, browsers, and virtually every game and game engine that are all implemented in C++. So, unless you=E2=80=99re living in a fantasy world where everyone is aband= oning proven technology for glorified scripting languages, I suggest you step back and recognize the reality of the situation. I'm sure the idea of enhancing C++ makes no sense to you, and would be a waste of your time and energy, but not everyone is that stupid/incompetent so even if i do get bored of maintaining it, literally any C++ dev can pick it up, it really is that simple. Cheers, Lanre. --000000000000ed41b0061f821aee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Aug 12, 2024 at 1:36=E2=80=AF= PM John Coggeshall <john@coggesha= ll.org> wrote:
lol. Listen friend, I've been involved in PHP internals on a= nd off for over 20 years -- and so has Pierre. You'd do well to respond= with a little more consideration instead of flying off the handle calling = us ignorant rust developers lol.

The idea of enhancing suppo= rt for C++ makes no sense. It's a waste of time and energy. The entire = industry is actively trying to to move AWAY from C/C++ in general, not to m= ention someone has to maintain it after you get bored insulting people here= and move on. This is doubly true when the benefit is a handful of people w= ho want to might write some extension in C++.

On Aug 12 2024= , at 2:59 pm, Lanre <lnearwaju@gmail.com> wrote:

I didn=E2=80=99t realize this was a= n open mic for Rust devs to flaunt their ignorance, but since you=E2=80=99v= e decided to chime in, let me spell it out for you. Rust has absolutely not= hing to do with this discussion, so try to stay on topic. Nowhere did I men= tion a move to C++; perhaps reading comprehension isn=E2=80=99t your strong= suit.


PHP already supports C++ for extensions, as eviden= ced by the intl extension. The current support is painfully basic, which fo= rces developers to waste time on redundant wrappers or use third-party libr= aries like PHP-CPP. What I=E2=80=99m proposing is a way to improve this sup= port so C++ devs don=E2=80=99t have to keep doing the same menial work over= and over again.

All of this will be wrapped in macros, so C = compilers won=E2=80=99t even notice the compatibility layer and will compil= e as usual. It=E2=80=99s a simple, elegant solution=E2=80=94something you m= ight not be familiar with, given your affinity for Rust=E2=80=99s convolute= d approach to everything.

Cheers,
= Lanre.

It= =E2=80=99s impressive that you=E2=80=99ve been involved with PHP internals,= but it=E2=80=99s clear you haven=E2=80=99t a clue about what I=E2=80=99m p= roposing and are contributing nothing of value. You=E2=80=99d have to be se= riously naive to believe that =E2=80=9Cthe entire industry is actively tryi= ng to move AWAY from C/C++.=E2=80=9D

The fact is, C is still the back= bone of nearly everything. If you=E2=80=99re building anything that interac= ts with an OS or embedded device, you=E2=80=99re either writing in C/C++ (C= ++ for Windows) or working with some C wrapper. Rust=E2=80=99s approach to = low-level implementation is laughable unless you=E2=80=99re prepared to abu= se unsafe or use Cranelift. Even simple things like JIT optimi= zations are considered unsafe in Rust.

Swift, which is heavily used i= n macOS, is essentially an LLVM wrapper=E2=80=94meaning it relies on C++. T= he recent advancements in Swift=E2=80=99s interop with C++ highlight just h= ow crucial C++ remains. Then there's Adobe apps, Microsoft products, br= owsers, and virtually every game and game engine that are all implemented i= n C++.

So, unless you=E2=80=99re living in a fantasy world where ever= yone is abandoning proven technology for glorified scripting languages,=C2= =A0 I suggest you step back and recognize the reality of the situation.

=

I'm sure the idea of enhancing C++ makes no sense to you, and would = be a waste of your time and energy, but not everyone is that stupid/incompe= tent so even if i do get bored of maintaining it, literally any C++ dev can= pick it up, it really is that simple.

Cheers,

Lanre.

=
--000000000000ed41b0061f821aee--