Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123973 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 5E0191A009C for ; Thu, 27 Jun 2024 21:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719525310; bh=YUk5rMVXSPndTb/KsSQQzqx86D29eo32Z5fwcCAeOL0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=byFTXVhaW4xqnayHHdoa2a+YSntw0Zvvwa9Yz/WE6qO2lrcC0KLZEG6MZJucT8+QE xGbWP3jXb8uxnLWleZfqt5M2gvQwfNF9GXdNkVgKrqoPoqZ3d663OjBFWzwe7Sbfmd 2kJrrJYAfs1P1L8j3d3tBVcHuyvr7w1stWkFHCU/QlImKjsBCauIiGH5loHwn3LL/R hBSCuytaSzaFq60tb355Ge0JCDhSm7vM6DCp627QJl/8HpVLOOyZhi6q9rBV17WjAy axlebOMzwj9oA7tghJpLYqp0SOyNIrsULtwSw1vQnyzewWXgrqdfWXsSSXOnQjz8T+ 9gBWy942ybUUA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AEAC11806C6 for ; Thu, 27 Jun 2024 21:55:09 +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,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) (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 ; Thu, 27 Jun 2024 21:55:09 +0000 (UTC) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-656d8b346d2so5984106a12.2 for ; Thu, 27 Jun 2024 14:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719525230; x=1720130030; 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=YUk5rMVXSPndTb/KsSQQzqx86D29eo32Z5fwcCAeOL0=; b=bzisA7lHHffg6RpnVGmFzS3MCgZs0TpImWoPGFw0d6K5F7fCjeGbd04VQ3jKbih5Re vxSNw2NCgkadLssTGlz90CySzaEeFdlKDzuCw75H6Q/3bEchzGf7zHVVsWBbEMY+aXph grp74tgL8f2biBEq9ScVbRttvyzxL2iRD8H8X9trbyY+1/+P0zq0mMYM1ErHnhMuxr8t ++hDkK12pTrESkV8ilJLY4e8c0AFAw0toESW0EQb7DYMSYnfzWVrGqvUe8tiuHBCCnJY AGk2G70OMuEWUFuOCUCnWMh4rIbHsX4uvQ+n09WAAiUGzx5XJQnPL2rXd8nrhksPtXgZ +gwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719525230; x=1720130030; 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=YUk5rMVXSPndTb/KsSQQzqx86D29eo32Z5fwcCAeOL0=; b=MRFfs8lPFJxM2cOw0RtbI7gj0Quht/RKLUSgYQar/XOXX1hRngwckUGKBw8v8ijbwS 9prBIuCOqfgWIhLv/FyKbkDg9uANKi3TOAoV0OSD1vW18UDzZU1aakXU4MVYZycUPQWH TizmURO1d7TjSO0Y7rS73ZPEZKTc1ulF1hYkdxpR+uZdGrGXeQwGnGVerkkKWjbnAyEV +qpqtiqVSao0ACVFR08Ft0DiYEYU4Xw8GnQijlNQX48ZWKFrabTs+1AG1cTXmy22YBwa hD/OxiEzh5kWKqlZr/dGGUAD6Ce+/Y4L/YslK2Sj8rsFE/jDQBnw1axWazPZS21N6ru1 pTzg== X-Gm-Message-State: AOJu0YwaQsb0VS2RvlvEKJhioL8vi7bjl9XtEIHGq9bcoNNz53DERmHQ JVA+ImHIetjSEuhEQHnzKKK/XYkvtZMlI3pvC+Z0p0rSobPcl60XtKFHMCXGD6mHG9IChIaRStK DATTDxezWdY2PCHaJgdDrJyZNXmg= X-Google-Smtp-Source: AGHT+IGTUOcBzHzktApnJk5SkcMflYBe393GFY/qeiAz9pRC54w0HObIDWFiWUIleXC+HwkqoaICFDRz7aAamfhwZXI= X-Received: by 2002:a05:6a20:12c3:b0:1be:cbe9:f765 with SMTP id adf61e73a8af0-1becbe9f89amr5013634637.18.1719525229799; Thu, 27 Jun 2024 14:53:49 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <0acedb8e-34be-4348-907b-4075cf7641fd@app.fastmail.com> <9c20b078-f82a-47fe-af23-2f3cdd233079@app.fastmail.com> In-Reply-To: <9c20b078-f82a-47fe-af23-2f3cdd233079@app.fastmail.com> Date: Thu, 27 Jun 2024 14:53:39 -0700 Message-ID: Subject: Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript To: Jim Winstead Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000813159061be62a66" From: jordan.ledoux@gmail.com (Jordan LeDoux) --000000000000813159061be62a66 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 27, 2024 at 2:41=E2=80=AFPM Jim Winstead wrote: > On Thu, Jun 27, 2024, at 2:14 PM, Jordan LeDoux wrote: > > On Thu, Jun 27, 2024 at 12:53=E2=80=AFPM Jim Winstead > wrote: > > > On Wed, Jun 26, 2024, at 7:15 PM, Michael Morris wrote: > > PHP User Modules are php files that are brought into the runtime through = a > new parser that is able to generate faster and more concise runtime code = by > removing support for problematic features and imposing a strict mode by > default. They focus on PHP as a language and not as a template engine. > > > I think the problem I have with this proposal is calling these "PHP User > Modules". Here's an admittedly uncharitable rephrase of this: > > "NewLanguage User Modules are NewLanguage files that are brought into the > PHP runtime through a new parser that may theoretically be able to genera= te > faster and more concise runtime code by implementing a different language > based on much of the syntax from PHP. This new language does not prioriti= ze > its use as a template language for HTML." > > > Do you feel that Phar is a separate language? Is PHP no longer PHP if the > @ error suppression is removed? I'm really unclear about the point you ar= e > making here, even if I ignore the "uncharitable" rephrase. > > > If I read through the 11 bullet points under "User Module Files" in the > original proposal, I see two that are actually related to modules and mos= t > of them are just lopping off features from the PHP language in ways both > small (no need for instead of '::', '->', and '\'). > > The angle I am coming at this from is improving the developer experience > around "packages" or "modules" or whatever you want to call them, and so > much of this proposal doesn't seem to be about that. > > I could have made that point in other ways, and I'm sorry that my first > attempt came off as insulting. It really concerned me when I already saw > discussion about taking this off-list and going into the weeds on technic= al > details when the problem that is being addressed by this proposal is > extremely unclear to me. > > Jim > Ah, yes, THAT'S a fair point. While the idea of optimizing the engine/parser for modules has merit as part of a user modules proposal, I agree that many of the specifics proposed here feel pretty scatter-shot and unclear. The scoping operator change I simply ignored, as that feels to me like just asking "I would like to program in Node" and there's no clear benefit to changing the scoping operator outlined, while there is a clear detriment to eliminating the concatenation operator entirely. Mostly I ignored that aspect of it, because I assumed that all the people capable of implementing this proposal would just refuse stuff like that outright, and that the inclusion of it would guarantee the RFC fails, so no point in worrying. But the broader question you are presenting about the focus and goals of the proposal, and how the specifics relate to that, is actually a question that I share. Jordan --000000000000813159061be62a66 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Jun 27, 2024 at 2:41=E2=80=AF= PM Jim Winstead <jimw@trainedm= onkey.com> wrote:
On Thu, Jun 27, 2024, at 2:14 PM, Jordan LeDoux wrote:
On Thu, Jun 27, 2024 at 12:53=E2=80=AFPM Jim Win= stead <jimw@= trainedmonkey.com> wrote:
=

On Wed, Jun 26,= 2024, at 7:15 PM, Michael Morris wrote:
PHP User Modules are php files that are brought into the runtime through = a new parser that is able to generate faster and more concise runtime code = by removing support for problematic features and imposing a strict mode by = default. They focus on PHP as a language and not as a template engine.
<= /div>

I think the problem I have with this proposal is c= alling these "PHP User Modules". Here's an admittedly unchari= table rephrase of this:

"NewLanguage User Modules are NewLan= guage files that are brought into the PHP runtime through a new parser that= may theoretically be able to generate faster and more concise runtime code= by implementing a different language based on much of the syntax from PHP.= This new language does not prioritize its use as a template language for H= TML."

Do you fee= l that Phar is a separate language? Is PHP no longer PHP if the @ error sup= pression is removed? I'm really unclear about the point you are making = here, even if I ignore the "uncharitable" rephrase.

If I read through the 11 bullet points under "U= ser Module Files" in the original proposal, I see two that are actuall= y related to modules and most of them are just lopping off features from th= e PHP language in ways both small (no need for <?php) and huge (changing= the scoping operator to '.' instead of '::', '->= 9;, and '\').

<= div style=3D"font-family:Arial">The angle I am coming at this from is impro= ving the developer experience around "packages" or "modules&= quot; or whatever you want to call them, and so much of this proposal doesn= 't seem to be about that.
I could have made that point in oth= er ways, and I'm sorry that my first attempt came off as insulting. It = really concerned me when I already saw discussion about taking this off-lis= t and going into the weeds on technical details when the problem that is be= ing addressed by this proposal is extremely unclear to me.

Jim

Ah, yes, THAT'S a f= air point. While the idea of optimizing the engine/parser for modules has m= erit as part of a user modules proposal, I agree that many of the specifics= proposed here feel pretty scatter-shot and unclear.

The scoping operator change I simply ignored, as that feels to me like j= ust asking "I would like to program in Node" and there's no c= lear benefit to changing the scoping operator outlined, while there is a cl= ear detriment to eliminating the concatenation operator entirely.

Mostly I ignored that aspect of it, because I assumed that = all the people capable of implementing this proposal would just refuse stuf= f like that outright, and that the inclusion of it would guarantee the RFC = fails, so no point in worrying.

But the broader qu= estion you are presenting about the focus and goals of the proposal, and ho= w the specifics relate to that, is actually a question that I share.
<= div>
Jordan
--000000000000813159061be62a66--