Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119954 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11062 invoked from network); 12 Apr 2023 13:03:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Apr 2023 13:03:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 447BE180084 for ; Wed, 12 Apr 2023 06:03:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 12 Apr 2023 06:03:38 -0700 (PDT) Received: by mail-ej1-f45.google.com with SMTP id qa44so28326053ejc.4 for ; Wed, 12 Apr 2023 06:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20210112.gappssmtp.com; s=20210112; t=1681304617; x=1683896617; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tL284ANX2onKrvZJze6RHPoY763hOLvaX3eVKVQ2/VA=; b=cVnTUVKER1wibdneza3m1cIY4ybRbrMidF6tUH7+lAgRftLQ5OnBeAk4w+kQCGyBqB 4SLfZur1RJn03dQ7p4ZL6P1suhw7Uze1ZOrdEw9mqdzOkFKIeQqLsYpVAmP7mKLqhpCE mNSOVLmV75jHk0pJKY4At6FPd3TAUM0cogJcl/HiVuZE1SiZ5DwFSbWPIcx5BF6k5fmk qgKxFhQcxhkEPByMqkFe5GNjNhQVLYWBknrBjkaK8oHXtaWTpqF7C0pMndOQ0/C85Uds 6XNmi+IdNYEoxRe/HaVujVuR0xeMCHxKyXqhh+Dfv7AC9EXeFZnoVNkG/aP3Mcy2DYVz yRlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681304617; x=1683896617; h=content-transfer-encoding:cc: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=tL284ANX2onKrvZJze6RHPoY763hOLvaX3eVKVQ2/VA=; b=s4zi6D3Veh6d/fJkOOxCFAIdEx/BglTHzkUPS0m0uNqXlQPEzeyfG8B8ZbimGDqf0N /uy3IbwhQm3BY2zDrC4FKdRzKuuy8qnQal33FYHeD36rTyTxMik4OnCUgbr8AXoKz4Co 03EebMyHi9RNr/oYHbgFyAh383x2/GXtdnO83WJN3ZA41y8aBxgNyaIelJokZ/jS6Qup pPc7YcafJcAQGRpXHq24M45R9Q43SAkdgXVsc3RKj+WC+7v3MUc8X0taP51RPyQOGLEc ju6n9h+5SjcLSPwtqYo9v8RjorbtjMrc1CaZPLecgStr63COzZ6fF2eSd2tx007efeAP fonw== X-Gm-Message-State: AAQBX9fx4EJXTaUOB/J6StBR0D3E8d+xy76fBdl0HPwKVOz8cWYKlzKZ PClIIyiLZ5sJlJen/5voKc1dWwLw/Ggw6AzBBKv7vcaU7Q+tunizAV4= X-Google-Smtp-Source: AKy350bSbUYzHmJ0ZQ8XjTqgkT77/vB+RExC8KJG31CUfUH2S/OnU90oRJvEe0YHvuBZ7sShU4qzdkK49g9n455ZKDc= X-Received: by 2002:a17:907:c60b:b0:94a:6cae:701f with SMTP id ud11-20020a170907c60b00b0094a6cae701fmr5158850ejc.8.1681304617334; Wed, 12 Apr 2023 06:03:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 12 Apr 2023 14:03:26 +0100 Message-ID: To: Nicolas Grekas Cc: "G. P. B." , PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading From: Danack@basereality.com (Dan Ackroyd) On Wed, 12 Apr 2023 at 09:24, Nicolas Grekas wrote: > > I would like to see a similar benchmark with function autoloading enabled= . https://github.com/phpbenchmarks/ Can you point me to where one can tell the benchmark framework to use a custom version of PHP? > One of the big differences you'll see between PHP 4 and PHP 5 codebases i= s > the number of source files - when people had to manually list each file t= o > include, they tended to bundle things into larger categories; Yes. Or to put it more generally, the ergonomics of using a language (aka the developer experience) affects how people think and write code. I'm just going to quote someone from Reddit and my reply, because it captures the essence of the situation perfectly: TheBroccoliBobboli wrote in /r/php >> I'm struggling to see the advantages of this vs working with static >> class functions, e.g. Helper::function(). >> >> That's mostly because I can't even remember when I last declared a >> function outside of a class in any serious project though. > Danack wrote: > That the ergonomics of using functions in PHP is currently so bad, that y= ou > don't use them, is proof enough of why the ergonomics of using them needs > to be improved, and autoloading is the most obvious improvement. Nicolas Grekas wrote: > Then comes my second main question: what does this solve? Or, to appeal to a higher authority: "There is this one thing that I noticed recently and that concerns me: PHP devs don=E2=80=99t use functions= ." - Nikita Popov https://www.npopov.com/2012/08/10/Are-PHP-developers-functop= hobic.html Nicolas Grekas wrote: > It doesn't enable anything that a script generating a list of include statements couldn't Exactly the same argument could made against class autoloading. cheers Dan Ack