Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121781 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58849 invoked from network); 23 Nov 2023 14:20:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Nov 2023 14:20:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7CA2A18003B for ; Thu, 23 Nov 2023 06:21:01 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail1.25mail.st (mail1.25mail.st [206.123.115.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 23 Nov 2023 06:21:00 -0800 (PST) Received: from smtpclient.apple (unknown [49.48.245.183]) by mail1.25mail.st (Postfix) with ESMTPSA id 92260605B3; Thu, 23 Nov 2023 14:20:49 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) In-Reply-To: Date: Thu, 23 Nov 2023 21:20:36 +0700 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <79d675e3-95b4-40bb-baf4-3e1c998f5390@online-presence.ca> <34979AED-893F-45DD-B641-A9F4F39B2928@newclarity.net> <2D505086-6AD9-4596-A515-85B50F5D12C5@koalephant.com> To: Rowan Tommins X-Mailer: Apple Mail (2.3774.200.91.1.1) Subject: Re: [PHP-DEV] RFC Proposal - static modifier for classes From: php-lists@koalephant.com (Stephen Reay) > On 23 Nov 2023, at 19:42, Rowan Tommins = wrote: >=20 > On Thu, 23 Nov 2023 at 11:48, Stephen Reay = wrote: >=20 >>=20 >> Respectively, I disagree that it's "not a big problem" if your goal = is to >> encourage people to use regular functions over classes with static = methods. >>=20 >=20 >=20 > Just to be clear, my answer was specifically addressing your point = about > using Composer as an argument for not including things. >=20 > I was not saying "... and therefore the argument is true", only "... = and > therefore we can discuss the argument without mentioning Composer if = we > want to". >=20 >=20 Fair enough, apologies for misunderstanding what you were saying there. >=20 >> PHP ships with a built in class autoloader function, and pretending = that > using 'require_once' everywhere a function is used, is just as easy = for the > developer seem disingenuous to be honest. >=20 > PHP ships with *the ability to configure* an autoloading function; it = will > not load any files without you first telling it where to look. I'm talking about php's builtin *implementation* of an autoloader not = just support for the *concept* of class autoloading using a userland = function. Out of the box, with no package manager or module loader or anything, = you can do as little as call `spl_autoload_register` with no arguments, = and have working class autoloading. Yes you *may* also end up setting = the include path and/or autoload extensions at runtime, or even writing = a custom autoload implementation - but none of that is required for it = to work. > The > workaround being proposed is not to use require_once every time you = want a > function, it's to use require_once in the same place you configure = your > autoloader. >=20 > I totally agree that we can debate whether that workaround is = sufficient. > I'm just trying to frame that debate as "autoloading vs require", = rather > than a distraction of "Composer vs something else". >=20 Ok, again, apologies for the misunderstanding of the point you're making = - and thank you, I agree that is a better way to frame the debate, when = it comes to language / stdlib features. >=20 > Regards, > --=20 > Rowan Tommins > [IMSoP]