Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107882 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33276 invoked from network); 28 Nov 2019 13:05:55 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 28 Nov 2019 13:05:55 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 124852D1554 for ; Thu, 28 Nov 2019 03:01:04 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 28 Nov 2019 03:01:03 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id l1so10501614wme.2 for ; Thu, 28 Nov 2019 03:01:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=K9UzRu8aVnS8BjFY4NTpbprTT/OxhYWnHSxM7XmWgjE=; b=ZOG6KAz+zvEMzB9KBg/Nqx7xVNnESw1gvrvn7yFonQ9LThtYbkkY8GMmyNoGygGHaj mm4qLTMaprQiyQBDeVMIpn1zXAAx5mFrjKVhkL97hcGDNCcciRBfczxLqZDyAbK+flVD Zb7EgAVuLPXdCn04bH9akM4gCHT+AbiPMrasmF8dYqgv0EOz7OLYiiVMBq/UrZ/ZrQyv DKveuCkbOB7DoYJdL8623fNFtQZ7QJUBW2ZQUo0rEPuQZOLQ9sudGHkJSvN17l4p6dCg Kcr4WXKCCEyROy0dv3Fzx5h9QBsLNVjsgu2mzQpzF3I4OFhsRhk/jNhFTORqnno2kamZ 5oQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=K9UzRu8aVnS8BjFY4NTpbprTT/OxhYWnHSxM7XmWgjE=; b=m6hO22K6uE+uud84SHx9npBMeOO1mb4LKANF6cvcqkpK7RWqWOaUqGtXLUJ5eMzny5 FKPGJeDBLXfyTV9PD41X7o//6rlTE4+sqI8+u4P8rul7I8nz73g9r1QReNVPrH2okXqW xwQnfyjSWpbSbr++UkTXUjXmtEOikI0Xxtns10Hhu3GhEL4wqjraHfsy6xvfkeqIq6Jw 8WkGu65h1ADbT7bmyZqoGEg+aqqDBP/F3Ayw5km/Hr7GJv4aT/kXnG7H4CaO30ekon0n ZpY+WEkthAtAZ8Z3AmmIHzgdogT8xC9HSUAb6lD4NLoAIGDSx0KPYtFwglq4XRHc5zG5 aXQQ== X-Gm-Message-State: APjAAAXK74DIbBG98DaOOn8thuCcnv+6YvpfiCKbJuea1S4LQXBEsrjy TXxXwW2TkjMsHO07CnFL4YI= X-Google-Smtp-Source: APXvYqw0D/1NhUyJhZdOvf/ylQohcqcDmGtz8M3837V+/BEfSe12mevJtXqIWfTENUhnI1QD5liAFQ== X-Received: by 2002:a7b:c3d4:: with SMTP id t20mr8655092wmj.94.1574938862596; Thu, 28 Nov 2019 03:01:02 -0800 (PST) Received: from [192.168.0.63] (84-75-30-51.dclient.hispeed.ch. [84.75.30.51]) by smtp.gmail.com with ESMTPSA id n16sm9219237wro.88.2019.11.28.03.01.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2019 03:01:01 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: Date: Thu, 28 Nov 2019 12:01:00 +0100 Cc: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Rowan Tommins X-Mailer: Apple Mail (2.3445.104.11) X-Envelope-From: Subject: Re: [PHP-DEV] Opt-in "use function *;" for skipping check for function/const in alternate namespace From: claude.pache@gmail.com (Claude Pache) > Le 28 nov. 2019 =C3=A0 10:35, Rowan Tommins = a =C3=A9crit : >=20 > On Thu, 28 Nov 2019 at 00:02, tyson andre = wrote: >=20 >> - Due to the absence of function autoloading (not supported in php to >> performance overhead), functions outside the global scope are rare in >> practice. >>=20 >=20 >=20 > If this is a valid justification, perhaps we should do the opposite of = the > "deprecate fallback to global scope" RFC you mentioned, and make the = "use > function *" behaviour the default in some future version. That would > provide us longer term benefits, such as being able to introduce = function > autoloading. I think it is better to keep the language as regular as possible, and = consider that every non-fully-qualified name is relative to the current = namespace, unless there is an explicit `use` declaration that says = otherwise >=20 > An opt-in mechanism is certainly easier to migrate to, but it would be = a > shame if every PHP file in 10 years time included a line like this: >=20 > use function *; // don't know what this does, but apparently it's good = for > performance =C2=AF\_(=E3=83=84)_/=C2=AF Or: =E2=80=9Cdon't know what this does, but apparently it silences = deprecation notices...=E2=80=9D The issue indeed is that the meaning is far from self-evident. Maybe one = could use something that everyone and their mother could understand at = first reading, such as: use function from global namespace; =E2=80=94Claude