Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123958 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 C1F161A009C for ; Thu, 27 Jun 2024 19:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719517988; bh=XSAyTfldKCDUewiuumEkbJ/Ltw2t9n/ZTh+i8Mu6/SU=; h=In-Reply-To:References:Date:From:To:Subject:From; b=BVVbD/qmX2FZ8i3o3Xwoxe17iSqty7R4q2ATAoOhsJmdjGjvRSPxN2FuxLC6X8H0A wBDV2YUHGBljlYp91nrXDpYQoqnwxosNigZShCDJnkR7Lfpr2aHttHI+bRIoIJ7xfy j0pgPaAR9mGFbPPjEQl99BUNll0Wu+sPcc3KAMbyPGn5SY8/Smc58hPKfItYHNHAx7 LM2h8jl6UHMo3tSqyfJiQ0h2t/V+PJfauYgCD79gcU+vF4VtSdF0uDBszo20rYLEQt V3ZolD5F7nn2pCxFUGWBJ6Rl8EfEB0f5bYkix2eC6L/S0TqWsQ/+2PH+JIFSVzRnfv D8h2XTJtXcMnA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C788218064F for ; Thu, 27 Jun 2024 19:53:07 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, 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 fhigh7-smtp.messagingengine.com (fhigh7-smtp.messagingengine.com [103.168.172.158]) (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 19:53:07 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 7303311400FF for ; Thu, 27 Jun 2024 15:51:48 -0400 (EDT) Received: from imap47 ([10.202.2.97]) by compute7.internal (MEProxy); Thu, 27 Jun 2024 15:51:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= trainedmonkey.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1719517908; x= 1719604308; bh=wO/PBM8wOyQ5jmUuOlqnYECOk1ZeZGWAm3FEACDN9rM=; b=K DEisYaWLUOuNhC/FlY4do7EjTW1UNW5mV0vp2z6Axa+p3g+ZjVZnnPvVqSOjnFYr SaI1MxDYjWYY+xy4IdCILwBCQPqKwNhWoNRoM9E8JbCn22HW3acFnM0bP76F4U+G sakrAmB3F7AiS51nVuap/WPoc8luBr4wFTwaqH4wZM4CR2SxKnnKrNXRez2dhu8i QpOOlTPzT1vP4MhUaChzkQMg54TZY7TLEzBjfE6sRWHHqOi/gunul+hsuD9hzF1c QOmVqMsK+wEw1sQ+rk/2a71YzI3wjdTadJJ9pr8QX+YYKiuKxFmaoj+WGeCM5OxW N9L9TgZ3g4ZQDi55FwI+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1719517908; x=1719604308; bh=wO/PBM8wOyQ5jmUuOlqnYECOk1Ze ZGWAm3FEACDN9rM=; b=ftlIBoroVsZlys30YKGvejqAlQLdSHFIAd6BkRD4LZfM fv0l7TLpuUIJ8awlSC04C+m+NNpHYvDy3E/t6CMlNphHQRu2z/8AB7NwSFc1HhfL iDQ6njM/KP6HOkZjwFt8mSGLRGD8vi4vzHfLRkEP+7LCYJujj5SnWLnIzFLEnBH6 LDn3YLXtOUU1y0XixnMlfn3SatziTEbvzX70saS6MSotUOWwDpGbBn2OOFqrEFMz tLL1R3akE6Bnrh9fSLXXqZ/UKkiEJO94HrtRT4Cq+nSnuVwf9Url8VuAN/9yKYIE MU9RF/iY+f1/HiOZztyHL6hWvr5BXgDUTLLfO3DXoQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtdeggddugeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsegrtd erreerredtnecuhfhrohhmpedflfhimhcuhghinhhsthgvrggufdcuoehjihhmfiesthhr rghinhgvughmohhnkhgvhidrtghomheqnecuggftrfgrthhtvghrnheptdettefghfeigf fhjeffgfduuddtjeeukeeigfffkeeuhfelkedtgfelfeffffeknecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhimhifsehtrhgrihhnvggumh honhhkvgihrdgtohhm X-ME-Proxy: Feedback-ID: ia2404087:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 11A33A60078; Thu, 27 Jun 2024 15:51:47 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-538-g1508afaa2-fm-20240616.001-g1508afaa Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <0acedb8e-34be-4348-907b-4075cf7641fd@app.fastmail.com> In-Reply-To: References: Date: Thu, 27 Jun 2024 12:51:25 -0700 To: internals@lists.php.net Subject: Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript Content-Type: multipart/alternative; boundary=3045d8ed21684d969538987be83e224e From: jimw@trainedmonkey.com ("Jim Winstead") --3045d8ed21684d969538987be83e224e Content-Type: text/plain 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 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 HTML." > The only background compatibility break is the introduction of three keywords: "import", "export" and "from" "We will add three new keywords to PHP to support accessing variables, classes, and functions implemented in NewLanguage." > If you got this far, thank you. This overall idea to take one of the better things to happen to JavaScript in the last decade and incorporate it into PHP has been bothering me for awhile so I figured I'd share. I don't know how much merit there is to this though. I think there is a lot of ground to be covered in improving PHP's concept of packages or modules that has largely been punted to user-space with autoloading and Composer and it's always good to address the seams that has left, but I feel like this proposal, as sketched out so far, reminds me more of what became Raku (from the Perl world) or perhaps Hack than an actual way forward for PHP itself. Thanks. Jim --3045d8ed21684d969538987be83e224e Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Wed, Jun 26, 2024, at 7:15 PM, Michael Morris wrote:
<= div>PHP User Modules are php files that are brought into the runtime thr= ough a new parser that is able to generate faster and more concise runti= me code by removing support for problematic features and imposing a stri= ct mode by default. They focus on PHP as a language and not as a templat= e engine.
=
I think the problem I have w= ith this proposal is calling these "PHP User Modules". Here's an admitte= dly uncharitable rephrase of this:

"NewLanguage User Modu= les are NewLanguage 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 HTML."

The only background compatibility break is the introduction of= three keywords: "import", "export" and "from"

"We will add three new keywords to PHP to support accessing var= iables, classes, and functions implemented in NewLanguage."

If you got this far, thank you. Th= is overall idea to take one of the better things to happen to JavaScript= in the last decade and incorporate it into PHP has been bothering me fo= r awhile so I figured I'd share.  I don't know how much merit there= is to this though.

I think there is a= lot of ground to be covered in improving PHP's concept of packages or m= odules that has largely been punted to user-space with autoloading and C= omposer and it's always good to address the seams that has left, but I f= eel like this proposal, as sketched out so far, reminds me more of what = became Raku (from the Perl world) or perhaps Hack than an actual way for= ward for PHP itself.

Thanks.

Jim
--3045d8ed21684d969538987be83e224e--