Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124026 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 3A3DA1A009C for ; Sat, 29 Jun 2024 10:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719658688; bh=LroVxrMkujoJdTJdcUrEVmN/XxbwVzJqmsoWdeqGET4=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=lLf1oIseU266nvlJpmEzosCMtuNcjYybVTbzjvEDAEYg2VRjmKyfffXMDyNjKlVGs +UklKMLYOe8uPOlKjrhDkiMenLxMK/svKNrxDv3evNj1IRS3/6vGDnchqjMkfqYFtG JCpMy4inaE3JBeQmLpCEUCEQQHL2oqq2/VQx97WAtnQzyzBO2ZV36GhH/3WCxD239i 0XASWtsyzdisjUIUBtI7RfUjwPZ5iU0yc4C0gY27bUnd20i1nj0BsOazXnNHagygoY D3auTrDTJ2sN5ZdtPxBu+zTF+T5fxWczl+V529hEwjHdH2oQmWzCRnJcZ53m5HbZbH WgJO4pbQuofRA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3C749181549 for ; Sat, 29 Jun 2024 10:58:06 +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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 ; Sat, 29 Jun 2024 10:58:05 +0000 (UTC) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-64b0d45a7aaso13815687b3.0 for ; Sat, 29 Jun 2024 03:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20230601.gappssmtp.com; s=20230601; t=1719658606; x=1720263406; darn=lists.php.net; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=frkZMtiI4csS4/sbErb5kdkQf1F8VwDPn85lRTTDsXQ=; b=tSAgCIaWuE+vHI2JYjqhLK52Ketdsrgw6TdZEhWeHg3ZNv30ey2AK8K2gSPs/J/2U5 2dStt9tZSNZgGb1M/w9T9SXnzbJHriqmRjXm4yxja93Z6/Whym5T+GBJFaYBmwnGglvy hepy0EuDcpjGJmcOQ9ue2IDv3BrV/iBltBWWsAy9c0hGhFBa6+Q2QIyRnfGJwPJ+adV6 hoXJuo9+G9ozzpjsSCqcYpCjdWn0999C7gN4W0OtP7M6mS/gIOxcz0LhV7KBNL1tcW1x dmjjVr55B0SZqrNg5TGST7ACdJZsUM5L9O8Um/IafqY2Q3DC7Dh27QHPGKRUL2oy5SpK eeFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719658606; x=1720263406; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=frkZMtiI4csS4/sbErb5kdkQf1F8VwDPn85lRTTDsXQ=; b=Hm9EiYXw9rmLp6/aGCEmSrw8+CFr70e9qenGPdm1Ya3yBG/N5fQnJnFSyCjCOGNdSf 17bNHQEV/y9X6THKiGbF8WHC/OkCIRsoGbZI+kQAnrBI1ikeCWBIDEyzCfMSqYcPKHg6 kwghIP+l+gQtBek7m7zWMVShO4eDGKhWugX1fRThBX0eQlvI3oVYLUnGX+kGQSh2aJos NC7K93mde7m9+qRQeLmuU6PQ5IrDK319Jn6SxyUQ6NuSZ8e97Z4IjkOqh/nyARNqlKF1 hMVQAYrs7DKyiR84uLqoI66HxDFuYJh5gEj/lQ/bhhU20exlWdgd41AEL4OTluOZmjID NNyA== X-Gm-Message-State: AOJu0YzscyUi+t4BhjVzur6wvjJwYEZ9XOxpUZaArW2C4vvAGuOQjdnz 4u4+cQVqw6tNKAeo7voICm3QI7fWrP+gAC/SC9u1QtmejKOJfjdhyuZ6uTFzQ3sRotfV5NjBEvF nNFc= X-Google-Smtp-Source: AGHT+IFr/oGYePCAzC/qLJPpRsL4nRg820XNlJ87wTHui8C+Trqc64uY5Qqgw27b3BCLOhWLBTvVUQ== X-Received: by 2002:a25:d3cb:0:b0:df4:b01b:3d21 with SMTP id 3f1490d57ef6-e036ec35df5mr607610276.49.1719658605635; Sat, 29 Jun 2024 03:56:45 -0700 (PDT) Received: from [192.168.1.227] (c-98-252-216-111.hsd1.ga.comcast.net. [98.252.216.111]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e036170080bsm385344276.18.2024.06.29.03.56.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jun 2024 03:56:44 -0700 (PDT) Date: Sat, 29 Jun 2024 06:56:43 -0400 To: =?utf-8?Q?Rowan_Tommins_=5BIMSoP=5D?= Cc: Internals Message-ID: <97EA49E2-43A9-42D2-B493-A6B66CC54914@edison.tech> In-Reply-To: <50529C6A-42BB-4D49-B720-FE1847577484@rwec.co.uk> References: <0acedb8e-34be-4348-907b-4075cf7641fd@app.fastmail.com> <9c20b078-f82a-47fe-af23-2f3cdd233079@app.fastmail.com> <50529C6A-42BB-4D49-B720-FE1847577484@rwec.co.uk> Subject: Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="667fe86b_19495cff_21e3" From: mike@newclarity.net (Mike Schinkel) --667fe86b_19495cff_21e3 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline > > On Jun 29, 2024 at 6:20 AM, wrote: > > > > On 29 June 2024 08:06:57 BST, Mike Schinkel wrote: >The takeaways that I think would be useful are PHP modules are: > >1. Imports >2. Import aliases >3. Module-level consts >4. Module-level init() functions >5. Module-level vars with initialization >6. Module-level functions >7. One directory == one module >8. No hierarchy for modules >9. Single word module names in lowercase. >10. Module sytax being , e.g. mymodule->MySymbol This all sounds like an interesting set of ideas for building a new language. > > > > > > > > > > > > > > > Maybe, if a new language only had a tiny set of the features needed to actually have a useful language. > That list is just package-specific, nothing about syntax, data types, control structures, package management, etc. etc. > > > Most of it sounds completely impractical to apply in retrospect to an existing one with millions of users - apart from the bits we actually already have, like points 3 and 6. > > > > You say it is impractical, you claim millions of users, but you don't address why the specific features are impractical. They are no more impractical than any other new language features PHP has added in recent years (and I am not being critical of what has been added, to be clear.) > > > Rather than looking at languages which have done things completely differently, > > > > > > > > > > "Completely" here is a leading word used in that context. There is nothing "completely" different about JavaScript, or Go for that matter. All three of JS, Go, and PHP are descendants of C. We are not talking about APL, Whitespace, Befunge, or Intercal, after all. > > > I think it would be more useful to look for inspiration for ones which are *similar* to PHP's approach, but have extra features. > > > > > > > > > > so there might be good and bad experiences we can learn from there, as well. And I'm sure there are others that are much less alien than JS or Go. I would argue JS and maybe Go is a lot more similar to PHP than Java or C#. But then the alienness is in the eye of the beholder. You claimed you don't know JS or Go, but I don't know Java or C#, at least not enough to be proficient in them. > That said, I really don't think gatekeeping based on the genetics of a language is the path to improving it. Instead I think objectively evaluating the specifics of the proposed features is the better path. And to me each of those things I mentioned stand on their own and can be justified, as needed. -Mike --667fe86b_19495cff_21e3 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On Jun 29, 2024 at 6:20 AM, <Rowan Tommins =5BIMSoP=5D> wrote:
<= br>
On 29 June 2024 08:06:57 BST, Mi=
ke Schinkel <mike=40newclarity.net> wrote:
>The takeaways that I think would be useful are PHP modules are:
>
>1. Imports
>2. Import aliases =20
>3. Module-level consts
>4. Module-level init() functions
>5. Module-level vars with initialization
>6. Module-level functions
>7. One directory =3D=3D one module
>8. No hierarchy for modules
>9. Single word module names in lowercase.
>10. Module sytax being <module><operator><symbol>, =
e.g. mymodule->MySymbol

This all sounds like an interesting set of ideas for building a new langu=
age.







=

Maybe, if a new language only had a tiny= set of the features needed to actually have a useful language.

That list is just p= ackage-specific, nothing about syntax, data types, control structures, pa= ckage management, etc. etc.

<= blockquote type=3D=22cite=22 style=3D=22margin:1ex 0 0 0; height: min-con= tent; border-left:1px =23ccc solid;padding-left:0.5ex;=22>
 Most of it sounds completely impractical to apply in re=
trospect to an existing one with millions of users - apart from the bits =
we actually already have, like points 3 and 6.


You say it is impractical, y= ou claim millions of users, but you don't address why the specific featur= es are impractical.

They are no more impractical= than any other new language features PHP has added in recent years (and = I am not being critical of what has been added, to be clear.)
<= br>
=
Rather than looking at languages which have do=
ne things completely differently, 
<=
br>

=


=22Completely=22 here is a leading word used in that context.

There is nothing =22completely=22 different about JavaSc= ript, or Go for that matter.  A= ll three of JS, Go, and PHP are descendants of C.

We are not talking about APL, Whitespace, Befunge, or Inter= cal, after all.

I think it would be =
more useful to look for inspiration for ones which are *similar* to PHP's=
 approach, but have extra features. 



so there might be good an=
d bad experiences we can learn from there, as well. And I'm sure there ar=
e others that are much less alien than JS or Go.

<= div>

I would argue JS and maybe Go is a lot more simil= ar to PHP than Java or C=23.  But then the alienness is in the eye o= f the beholder.  

You claimed you don't kno= w JS or Go, but I don't know Java or C=23, at least not enough to be prof= icient in them.

That said, I really don't think gate= keeping based on the genetics of a language is the path to improving it. = Instead I think objectively evaluating the specifics of the proposed feat= ures is the better path. And to me each of those things I mentioned stand= on their own and can be justified, as needed.

=

-Mike
--667fe86b_19495cff_21e3--