Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125151 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 AE9E31A00BD for ; Fri, 23 Aug 2024 16:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724432308; bh=ZA3EHXmFMHA2nPCkpftyCT8XpX9Mi5nlleJ/z8mS/d0=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=djmMWKUg1bev8YjTDH3BfMAcDwYivXVkhw5vk3xvPD15zmC2IUlt1YAxK/iDmFz5A HejDz/79rSAsapsCy+GMNqyZ0gcxWju6BO78U1uZKO4lVOmniFwqr4VpB+D7d5TT4b vbaQL3SeaSgYTOIME+FGkstPEt4a8ZRcIVqvsaIfOU8UPzqRYlje6+I2tiBrwXudwt 7Zm+BRDw/qr74+9/Yp/pYzF0LPZKz/22Vo84TCM+rDQ+IIFeYdRoZtRe6rzCn6maw4 MIyUXfW7A+rTgp8PqBvAAy1ogzWiA6fXmO8XpGtPOgtHHg3IXk65v0QByshgVE20qt Fh2vA5mJV/B5g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 696A3180054 for ; Fri, 23 Aug 2024 16:58:27 +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,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) (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 ; Fri, 23 Aug 2024 16:58:26 +0000 (UTC) Received: by mail-ot1-f47.google.com with SMTP id 46e09a7af769-70944d76a04so1494125a34.0 for ; Fri, 23 Aug 2024 09:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coggenterprises-com.20230601.gappssmtp.com; s=20230601; t=1724432195; x=1725036995; 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=ZA3EHXmFMHA2nPCkpftyCT8XpX9Mi5nlleJ/z8mS/d0=; b=AI0namia/426hlydA4HgnflHfMsIVTLArb7IjAGXKLNEAwXbuqoksX7PpU5fSCrqE/ sTMdDFPXkRk4QsDTKSrQValfjY7nrUT8FQpmkcZLpg+5Kurx6YMgQy4giFCeIae0y+ew kEYcQQPklrwr2RvmIvPNlI8KLZYZyn170MsS56RoZ47wblz6nUGSIzbRoNddR9zdjtI8 9D29xaaldHFd+aezaVI18l8cCW5BxYA9ymzHByw0mxNgvnB7E+c0rZkpq8RUfvwZwxBP FwsTWv2g+jRNdIJD1zMEEm8mlzTXSd9fkoEYBo6gGY5xfKvHAT7I7YMhbWdRweRUVTqe K7CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724432195; x=1725036995; 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=ZA3EHXmFMHA2nPCkpftyCT8XpX9Mi5nlleJ/z8mS/d0=; b=tPiXWA3sPct6SdwJJkhGJQXC46gHE8XqOV5obCUTgV5uS70dsftntAaqTDESL+MD9E fcHjx8pdzVLScCGl5jLd/7SMf8u7zepz8eBW821GNx3h1dX9qKa29j4XSeKZwf7o233B 4dRNSrBOQehlEx4I7Z9qcH6NDtAoqCAFYPTOYg51uhy8zLOqMEqUZxpNHeKcCMj13LN9 MBLl/TwGkDCPSnyQXBKz6JiJW210gOyTrtaC15eIY9UFBAq5zGoux8b5JtKi0Ca8+KuX LJ0mBk+JcQIwh8FjegHtSdm7Cvy/yDUkUJo8xCr6trVvQuX2vRiecnbvFctL3jeRnAnz jffQ== X-Forwarded-Encrypted: i=1; AJvYcCW4Ovgr+RhVbHoKqiQRm2O4ORDKVEwxDvkPVqMHXzFZJgLLVH2YlA4zPC5DmUXVv0iahMzSVI3sU90=@lists.php.net X-Gm-Message-State: AOJu0Yw14R9Ji9+rChpTETakejGUq67UCOcXlRrcA5B5uv8ZrJt61NEr Xed+Kiz+XuCOxteCuWoBdR8gJEpco4wLQwVYg45667rXTcog1Vgl4MzuM8oOl9IOKcDw6CWlPhA P X-Google-Smtp-Source: AGHT+IH3LJGxSshEjrwLFCvZKjA4KVfIenU/7oaAtt5gw2XGeEYLUlzDJjNitTA7Wb+ZvQYQz25h3Q== X-Received: by 2002:a05:6830:71aa:b0:703:66eb:ef8 with SMTP id 46e09a7af769-70e01b63a27mr2612090a34.5.1724432194931; Fri, 23 Aug 2024 09:56:34 -0700 (PDT) Received: from Johns-MacBook-Pro-2.local ([207.213.210.67]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-70e03b60242sm717412a34.62.2024.08.23.09.56.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Aug 2024 09:56:34 -0700 (PDT) Date: Fri, 23 Aug 2024 12:56:32 -0400 To: Stephen Reay Cc: =?utf-8?Q?Rowan_Tommins_=5BIMSoP=5D?= , PHP internals Message-ID: <19ED3E60-FB1C-4691-B0F6-7BF3A569821B@getmailspring.com> In-Reply-To: <68BD8107-9BBE-476B-B085-B340CB709A49@koalephant.com> References: <68BD8107-9BBE-476B-B085-B340CB709A49@koalephant.com> Subject: Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local) X-Mailer: Mailspring Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="66c8bf40_327b23c6_15341" From: john@coggeshall.org (John Coggeshall) --66c8bf40_327b23c6_15341 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Aug 23 2024, at 12:27 pm, Stephen Reay wrote: > > The current inconsistencies between symbol types can be avoided in userland in a 100% consistent way. Import or qualify the symbols you use, all the time, and you have 0 inconsistencies or bizarreness in terms of what it used when. So are you essentially arguing that we should put the burden on the majority of users, most of whom (documented by us or not) likely will have no idea what the problem is or potential consequences are? BC breaks happen. While I am all for avoiding BC breaks when possible, sometimes they make sense -- and I think this is a clear example of when it does. I think you are exaggerating the impact of the BC break here. In fact Ilija measured the impact on the top 1000 composer packages: https://gist.github.com/iluuu1994/4b83481baac563f8f0d3204c697c5551 > I was specifically pointing out that a small number of people complaining about this is a ridiculous reason to even consider the change. That's one take. Another take is this is an easy win for a few percentage points bump in speed, with improved supply-chain security for composer packages that has a minimal impact on users. > Great, how about the solution that doesn't have any BC, and works in every version back to 5.3? By this logic, we should never introduce BC breaks. > Great, so then we can resolve this whole thing by adding a footnote to the "Name resolution rules" page in the manual that (a) recommends using qualified names (i.e. prefix with a `\`) and (b) provides deeper details of the reasons for those who care. From the perspective of program language _design_ (which is what we're talking about here), the goal is to create a language that helps the developer do something faster/better/easier, not do the wrong thing (slower code, etc.) by default and dump the responsibly for that on developers by expecting them to read a footnote buried in a doc. Especially when the justification is because there's concerns that code written in 2009 won't work anymore. --66c8bf40_327b23c6_15341 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On Aug 23 2024, at= 12:27 pm, Stephen Reay <php-lists=40koalephant.com> wrote:

The current inconsistencies between symbol types = can be avoided in userland in a 100% consistent way. Import or qualify th= e symbols you use, all the time, and you have 0 inconsistencies or bizarr= eness in terms of what it used when.

So are you essentially arguing that we should put the burden on the= majority of users, most of whom (documented by us or not) likely will ha= ve no idea what the problem is or potential consequences are=3F BC breaks= happen. While I am all for avoiding BC breaks when possible, sometimes t= hey make sense -- and I think this is a clear example of when it does.
I think you are exaggerating the impact of the BC break here.= In fact Ilija measured the impact on the top 1000 composer packages:

I was specifically pointi= ng out that a small number of people complaining about this is a ridiculo= us reason to even consider the change.

That's one ta= ke. Another take is this is an easy win for a few percentage points bump = in speed, with improved supply-chain security for composer packages that = has a minimal impact on users.

Great, how about the = solution that doesn't have any BC, and works in every version back to 5.3= =3F

By this logic, we should never introduce BC brea= ks.

Great, so then we can resolve this whole thing = by adding a footnote to the =22Name resolution rules=22 page in the manua= l that (a) recommends using qualified names (i.e. prefix with a =60=5C=60= ) and (b) provides deeper details of the reasons for those who care.
=46rom the perspective of program language =5Fdesign=5F = (which is what we're talking about here), the goal is to create a languag= e that helps the developer do something faster/better/easier, not do the = wrong thing (slower code, etc.) by default and dump the responsibly for t= hat on developers by expecting them to read a footnote buried in a doc. E= specially when the justification is because there's concerns that code wr= itten in 2009 won't work anymore.

--66c8bf40_327b23c6_15341--