Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119910 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68698 invoked from network); 11 Apr 2023 12:01:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Apr 2023 12:01:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 274D51804D5 for ; Tue, 11 Apr 2023 05:01:21 -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-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 ; Tue, 11 Apr 2023 05:01:20 -0700 (PDT) Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-94a34a0b531so189839366b.1 for ; Tue, 11 Apr 2023 05:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20210112.gappssmtp.com; s=20210112; t=1681214479; x=1683806479; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NQRRwYHEfJWxhdijo3B873HfRrCsvWvBVfj6AEIhgus=; b=Tj6ky3Atkhf2GVtX8mLwaxxBrJVtQBh50lAOpb/NBpc7MrrOrnQtdhyZ3wSRw0Fupf mOs+ygwAJstpe+QdXy+jK/arDv3Xhgmk4+iJUxeP2Jgilh6O0W7Ttr+6r4eKUOcdec34 e7YHTj0RTC+TAdHQhhP9NWORFw2cWQPnP2Q0P4MygzOEleOIC4l70TV1+LC+lca0Ncl4 t66NZx23f5SmSUJmRSuKt5LVGuZWPSkQ8iF8tbx3w75t1Ejq/BRFv5i0yAnbWGbdXGPf dQ1UfMSCpKPdwD27kFSiCn8q8BLQW+k5qpfeSYKS2pFCQzM5Pgcrk8WYN/U/Y6PN95o6 9GGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681214479; x=1683806479; h=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=NQRRwYHEfJWxhdijo3B873HfRrCsvWvBVfj6AEIhgus=; b=OOk6DnXBHpV/p/l5q/qsESEjCQm07+IoYnfCRxhhobMP7qgj0FKwztZXqRFk6m5sMk 644c0QfBGP9FN9kk2tw2JJMVyoybXoeJKxEpXydwRr9f1DJbqK2cwrsJpqsyGfqsoBjt s/iJR0OsNbhXcXrTqEu8uhFYzCImM6mxY9qO2vg1c/astwRjnqmrTFbGexNUpNX+Kel/ VwJYY+dvZYSy9aeTNoCD1LQEPwSG5tuxTaqWnTbsRdDSGFvb4PQpvuQCJnNdSXF9dQor No8+7UkwO5RetLYF101Vbyb5dY+qTSCzybYdG9DwF7HZ6a9dVZjUqcPn576hNfH5V5AW Raag== X-Gm-Message-State: AAQBX9fFx4dNvqwoqNtgJhE7qIMh5eIbSIIwVCfGNmcBFNERBsh1IINP aEBwK2zMU5IshIQG2F0Jjae3yLNFmpNulRZCxnea3tKzsJe6TXlCNFY= X-Google-Smtp-Source: AKy350bieu8Zls0VZ5IQJsNth7VqBO7HKXuinMKVIdsZPpBk8OMHIIA9bPDqLpI13G8IC7a6OkMpFuqB5f3+LP8uAg8= X-Received: by 2002:a50:9b56:0:b0:4fb:c8e3:1ae2 with SMTP id a22-20020a509b56000000b004fbc8e31ae2mr4992621edj.3.1681214479110; Tue, 11 Apr 2023 05:01:19 -0700 (PDT) MIME-Version: 1.0 References: <6FA5AA43-9738-4400-8D83-38FC2D464B82@gmail.com> In-Reply-To: <6FA5AA43-9738-4400-8D83-38FC2D464B82@gmail.com> Date: Tue, 11 Apr 2023 13:01:08 +0100 Message-ID: To: Rowan Tommins Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading From: Danack@basereality.com (Dan Ackroyd) On Tue, 11 Apr 2023 at 09:48, Rowan Tommins wrote: > > Similarly, I think it should be possible to "unpin" a function > lookup with a later definition, Can you say what the technical justification for that is? There's reasons why (imo) it's probably wrong, but I don't currently understand what you would want it for, so want to make sure I don't miss something in my response. > This isn't actually true: classes, interfaces, traits, and enums all share > a symbol table, and thus an autoloader. I don't know of a good name for > this symbol table, though. As per the RFC it would probably just be 'type'. When PHP is compiling some code: function foo(Bar $bar): Quux { ... } Before 'Bar' and 'Quux' are loaded, the only thing that is safe to assume about them is that they are a type, whether that be a class either with methods or without (also called an interface), or an enum, or eventually a type alias like `type number = float|int;`. > Regarding the API, would it be possible to take advantage of nearly > all autoloaders only being interested in particular namespace prefixes? Lots of things are possible, but I'd strongly prefer to have that be a separate discussion, which it's listed as a future scope: https://wiki.php.net/rfc/core-autoloading#higher_performance_through_maps If nothing else, it's going to take people time to figure out how they are going to organise code that is 'just' a bunch of functions. cheers Dan Ack