Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124752 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 C712A1A00B7 for ; Sun, 4 Aug 2024 20:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722801796; bh=jJaGAScpB9hKaK09PQozAG2tQa8nt9NcFARnZ8tBHCk=; h=References:In-Reply-To:From:Date:Subject:To:From; b=Qx2SZK7yUgwJvR5y9EkExrFfAOm2M+ymuE4jTTEuDf7BuYmCWjVci2nQm6kXMcXWH ujasLwn78InVW4pXgAD07IxGsd3WIqPQt/NUjSHuZJUDO906w6BnRz1HQDjkDOoIEN KTdqdNehJbPy9jjt5pEKoRuJIv6Bzh3ywbBh1Lgphhudhn/yJevZy2hhZKZzzo6cID Rw95EApA4dR3g+89IeXo61W5L/E+qpZ/xwc/i5DC/vYuGwZ/B1bZMk7rOvqJKwRblq kHswgN3HjvluzDFiKSFxNnGbLOqCDZ+XoYhQTlo4+uJFzBOKNCK71XlMBSW5udlZ84 NC7gs+mZoYM6g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 67C40180048 for ; Sun, 4 Aug 2024 20:03:15 +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, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.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 ; Sun, 4 Aug 2024 20:03:15 +0000 (UTC) Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-5d5d4d07babso5090471eaf.3 for ; Sun, 04 Aug 2024 13:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722801693; x=1723406493; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jJaGAScpB9hKaK09PQozAG2tQa8nt9NcFARnZ8tBHCk=; b=b6O1o0pNCuQShTDnNt+QWKgcBTXADwYNV8n7b7QXDU2MJfp+Tgo1nD5O63C9cYwLB2 gkodnujhkIjDsnwm92VlIaA0xeQBLtZ0xjMdPs1Fk+R5ceEYqgRvlGPHwKPmD/lzCksZ KHb3uuISAmDxhHVLvvbwn6hdEInX1wZqbqmDVpqx7DSzcMgnTP9VxkvpdPrA/BmWv5AO AqCvx0nrPHOZFnob3atWLocdKo2dGKEeJOfPMZHvf62v7pvlfPLskiTKHfjmMPTi7sow ApfbTVuISxDZ55kck3zxCXS4zOAOLB9atzOk7DUOdzLk6etMvpGhUrT4K6BSkMTPVGwO xKvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722801693; x=1723406493; h=content-transfer-encoding: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=jJaGAScpB9hKaK09PQozAG2tQa8nt9NcFARnZ8tBHCk=; b=HMCFw5l3sQhNFoliPm+4wAkn/hWAtW7/ANuV7No6EmnJpEg0x3jzu4ikpiToQeuAca ogETAxLYdQLONB9FBfXDb9JakERCeqb4yR4JWZ+y7vhCPmH/TkjA1X3pRSDnBbGcVkGp P74f7mRTveXEaowb+j9jClgbyD5+2K3MLSb5nZlzLX+tsXl7ut1nwpAp1Rmzmzja83Ge XxU0qCyde5OHADp6KM3UqKLrFu3L/i6urgNQ0NYhfucTX4kI4R555dAcwPLn57eeeLhE C63s9Jzc2zZhUEIurYO+DXDPMO59WgXbhPsk+Tz90rvoZ82SQtr+66zDm6xWydK4k9Uo FKGg== X-Gm-Message-State: AOJu0Yxq64UkXT0jobTUyoHCVWjk93H4clDnRjX+e42L0grwuD76N8cb ZABWZO0+C8JChgg79N4uan73yZSLIAeRmFtC8XrhgMK48w26kSfj0YfkhcO4ADieO3EFC9OhXpG nqgQj2F2NkbNEuKBv9MWDFLcT9vNfNiiZ3RCP2w== X-Google-Smtp-Source: AGHT+IEX3ttoRWvYjVJg3PB7X/on8UlMIm/aYg/5sMP9m2TryYj9R9o7EsiZ5kiUUxtBiy16g7DvOJ2ISxdkax2lyrE= X-Received: by 2002:a05:6358:591e:b0:1af:3e47:4e3a with SMTP id e5c5f4694b2df-1af3e474f99mr1147598355d.24.1722801693417; Sun, 04 Aug 2024 13:01:33 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <1a88918e-e808-d778-45e1-53797660e093@php.net> <3563cf9b-8eab-4c82-b525-a5d2f9a767bb@varteg.nz> <38920A4B-790D-48C7-B2F6-C49D3F506232@rwec.co.uk> <0824789d-0e36-4628-85c1-4b8d9b7f86af@varteg.nz> <2244a37f-8c51-448d-8a56-329ff32e6470@bastelstu.be> <0e1a21ddef3c7da17a3539b92d5f442763f4b1f8.camel@ageofdream.com> <5f1da5195e2aea7ec41e95ff4354f50b1717d3cf.camel@ageofdream.com> In-Reply-To: Date: Sun, 4 Aug 2024 22:01:22 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] Add Directive to Make All Namespaced Function Calls Global To: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tovilo.ilija@gmail.com (Ilija Tovilo) On Sun, Aug 4, 2024 at 8:41=E2=80=AFPM Nick Lockheart wrote: > > > > > > But that's not quite what the RFC says: > > > > > I am asking that we discuss and vote on the following question: > > > > > > =E2=80=9CShould there be some way for developers to signal to the par= ser at > > > compile time that all unqualified function names found in a > > > namespace context are global, without a namespace lookup?=E2=80=9D > > > > Which implies: > > > > 1. There is _some_ change to syntax. > > 2. All unqualified calls become global. > > I did not intend for all unqualified calls to become global, unless the > new directive is present. Sorry, my language was not precise enough. Your proposal suggests making unqualified calls global when the directive is present, whereas my proposal suggests keeping local scope as a fallback, hence the two not being compatible. What I'm saying is that: 1. If the vote fails, it might have been because some people don't want opt-in behavior. Niels just voiced this opinion. 2. If the vote is accepted, it would void my suggestion, because it is not compatible with the conditions laid out in your proposal. If this were a straw poll, rather than an RFC vote, it would be clearer that there is no mandatory approach or policy being accepted. A vote with multiple options to pick an approach (opt-in through some directive, hard BC break, flipping lookup order, nothing at all) might be more appropriate. Ilija