Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107959 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33709 invoked from network); 2 Jan 2020 14:29:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Jan 2020 14:29:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 81EE31804F3 for ; Thu, 2 Jan 2020 04:33:12 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 2 Jan 2020 04:33:12 -0800 (PST) Received: by mail-io1-f42.google.com with SMTP id v18so38163706iol.2 for ; Thu, 02 Jan 2020 04:33:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=3uD2KYpLFJq4PvKIRNxlNOJl835utgRLrZa8Ty3c+l4=; b=msK0f5STaAHOaNaLDsQMsLTmaz7F4FSdKnYbKSqd5XNKENqDP+113g4SNHN5dvEHGC m1lQnr4FKSbHjA7otFeMLRILBA+4MoY9DYVUaplA/fVwUbPQUn6A7auNeIQ/mWC07/uq Fuo5E6pwU78pN4zFP40GP4y6Wn+3OgQGC8SUq0R0YSegus+ex9ujmnVRsOcFkWFuQXne owsu77EXrDTKRtO9Cbkj5EmMUQxOmpzm4WkHqfOJezM3HvbtbzaPPbXNwIN5Hsf43YMc mNRR85DCIn9NozGyqfR0yofHP4Up5xIVmY8LyilHcrP/3urpM4mW9GhfHKAwiBFe5u2Y qzhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3uD2KYpLFJq4PvKIRNxlNOJl835utgRLrZa8Ty3c+l4=; b=U8BzXBQ7NRDZIgFFaPbEsn/+Sq4l6ql8jKm0wpbT2I6x/dtiHaLdwN89hcsOxV+tpe E0olsxT2mdMt1yJnlflaCwTr0uusOF4PLOBN9jU0VwlRj/WLpwen5kYjKibjDD36w+ZW pTxI4IWzQzZa4yGZykKe91ZzP9944yeVvQLUpr1bkx34dZ7cAAgKT7F4JEEYmViXEn3I fq3TZGaCYWT8VYClJGuspBuvFFRp1lfh+hWNvajX8LIjbKl/HTljFng7iYeuVaYjoyJ4 S605QBlFJ6TkJLemc6mS+03qYpsxRR2qK6AcPo3RM+vkwoyi5sktNdQ46fRKH6jG+Z/g nusw== X-Gm-Message-State: APjAAAUsUzUpgUzNZviB1tUMFgAX7IHazSfaQC9RZapMD83uExrkDOzm JeP34nvJHaMfUGK8LwmtSpJPUvJFO+EC35EJz7Wk1w== X-Google-Smtp-Source: APXvYqxWswRl+qqol9XbBGkoSnDGA63DhE++PG6ck6lQCARuXgAAVUSnGi7M+6W8mS76197hwFOksj/JEf87pg4rA/0= X-Received: by 2002:a02:864b:: with SMTP id e69mr62928991jai.83.1577968389030; Thu, 02 Jan 2020 04:33:09 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 2 Jan 2020 12:32:58 +0000 Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="0000000000004b86dc059b2765cc" Subject: Re: [PHP-DEV] Re: [RFC] "use global functions/consts" statement From: rowan.collins@gmail.com (Rowan Tommins) --0000000000004b86dc059b2765cc Content-Type: text/plain; charset="UTF-8" On Thu, 2 Jan 2020 at 05:37, tyson andre wrote: > Out of scope of this RFC: I had a thought today about autoloading. > I'd rather improve function / const autoloading instead of moving to > classes. > What if an ambiguous function_name() or const outside the global > namespace would attempt to autoload *ambiguous* functions in the global > scope, > but not the current namespace? > (and autoload unambiguous functions in their respective scope) > Could you expand on what you mean by "ambiguous" / "unambiguous" here? I think any nuance to which function is autoloaded needs to match the actual name resolution - it wouldn't make much sense for some_function() to call CurrentNS\some_function if already defined, but trigger an autoloader for \some_function if not. There may be simplifications with the proposed directive from this RFC, but we'd need to think through the different combinations and make sure they behaved consistently and intuitively. Regards, -- Rowan Tommins [IMSoP] --0000000000004b86dc059b2765cc--