Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101783 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35501 invoked from network); 6 Feb 2018 15:44:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2018 15:44:33 -0000 Authentication-Results: pb1.pair.com header.from=derokorian@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=derokorian@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.182 as permitted sender) X-PHP-List-Original-Sender: derokorian@gmail.com X-Host-Fingerprint: 209.85.216.182 mail-qt0-f182.google.com Received: from [209.85.216.182] ([209.85.216.182:34294] helo=mail-qt0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/84-49805-16DC97A5 for ; Tue, 06 Feb 2018 10:44:33 -0500 Received: by mail-qt0-f182.google.com with SMTP id a27so2843083qtd.1 for ; Tue, 06 Feb 2018 07:44:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6GHihEZ40l56nQP0N6Q05Y8KFL79mSxcDEcPq73N9eY=; b=HZGCoJblo82TC2qI5LFDFNGNGYj7zPZOFtBR21TEcCUeMiXEFN9u4gN2Bk+3BqbGxT xNA0iivrhGx7DKlgprhfOiq5NF59JXtLgMKGpmxkv4TfrRwgXI9TK/v1R+p+4FRgHH42 OONFzBm9pvgRuCTVysqJC3yiY/eGcAXR+DJ63I8XJ4LQNpDiY4TfF+T2BMiLR7RCDA8j VlFJVIWx/tvfgOwnYE4Fzf9wWDMRGSOaEx93Bf9QGt/m13kuIDAtuG5oL9M+x7EQwxvX 6Nw3e5xBxS+9Z1XTi/B1Oix0gqBVIueSApfCL4CQK4oJT5MnrZ5C86X19Tu5IZ6/dLeN Gf7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6GHihEZ40l56nQP0N6Q05Y8KFL79mSxcDEcPq73N9eY=; b=ZX/uuUTXwTxSaeO2jJcO8FzpexJriLa8E9U17Z78A0qq5lpPgTnmZzUD9O/fI8m6GU hw0QrBUXc5/qWxNM91m5xGi0XAk42X5HoJEXW6H9c3ZPrI1xsB2bcLfhG+2wv4Jc9SJd NqpIp+bPsl4HpgWuyoeSmvGSs5a7dDgy8W69Kc9N2gglZhpK78zQmU9YDcyI2AEW9gXA SDkZ2x5Lvzh6PdR/ygQRRtDVWQEvVlGtR0/WaihFpcDOyd83PiggeEHyjgK06c+6PfZ4 huTBLRK13yUrH2pBDNSJaKwWFtbZhQMbNFSp4TcebsnXuq3wJLfk1IsYQH3/DViRYCD5 BiYQ== X-Gm-Message-State: APf1xPB6slCRuRMHd1F7n7tsCKSfE4k/a9YxqDY0ze26qCSeqKaBy9H4 upo8DkSgOlWp9ZPEdmy8fvdnn+BEL9P/q1iSEA== X-Google-Smtp-Source: AH8x226aay5Ss5bwrxoLUfkb7UK7oBqJ6QQYoE0aEvY0uzRtRfBbVFjiNmXqGtMiPhlLtw2QcenWtqgCfUTe/h3zmVI= X-Received: by 10.237.49.9 with SMTP id 9mr4178249qtg.147.1517931870909; Tue, 06 Feb 2018 07:44:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.37.119 with HTTP; Tue, 6 Feb 2018 07:44:30 -0800 (PST) In-Reply-To: <5254389.jkSIk9W2zd@vulcan> References: <5254389.jkSIk9W2zd@vulcan> Date: Tue, 6 Feb 2018 08:44:30 -0700 Message-ID: To: Larry Garfield Cc: PHP internals Content-Type: multipart/alternative; boundary="94eb2c0c98a0f57a6905648d0d12" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope From: derokorian@gmail.com (Ryan Pallas) --94eb2c0c98a0f57a6905648d0d12 Content-Type: text/plain; charset="UTF-8" On Tue, Feb 6, 2018 at 8:24 AM, Larry Garfield wrote: > > > That said, I'm not sure that function autoloading will be that big of a > carrot > for the major projects at this point. Wordpress is going to ignore > anything > we do here anyway for at least 15 years, and pretty much every other > project > in existence has gone all-OOP or nearly-all-OOP at this point (good or bad > is > beside the point). Namespaced user defined functions are rare in my > experience > outside of very specific libraries (such as functional tooling libs). So > "yay, > you can now autoload namespaced user-defined functions" will likely be met > with > a lot of "what are those?" > > I disagree with this assessment. Many functions are actually collected in static classes so they can be autoloaded. So instead of, namespace Foo\Bar; class Map { public static function modelToApi(Model $model) : array {} } The function can now just be in a namespace directly, instead of treating a class like a namespace. You can then also import just the function you need, instead of the whole class. Many of these classes exist in projects I've worked on just for the purpose of being able to autoload the functions when needed. My 2 cents. > --Larry Garfield --94eb2c0c98a0f57a6905648d0d12--