Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119863 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 39126 invoked from network); 10 Apr 2023 15:36:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Apr 2023 15:36:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3E95618037E for ; Mon, 10 Apr 2023 08:36:51 -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=-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, 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-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (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 ; Mon, 10 Apr 2023 08:36:50 -0700 (PDT) Received: by mail-vs1-f44.google.com with SMTP id k11so1730190vsv.8 for ; Mon, 10 Apr 2023 08:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681141010; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=j0lS4y87u2lIutmurnUklvyGxszOKnqNHaTXkdx8xBk=; b=MMU797AIT9cxIHWPoOUb4cO+kfkRH2ZbiKGccNZAA/v8OcvSW8R/U4c0rARHhYbhk8 TGh1885ps/n3YSKbx0NFpDyFHirbgtswvSj7AQL45F6G20yKTSleUTMjsLvXPXwWlhcF 4uCwd/A/8HuhHPi+h0o+hCOwMJXUvP3N2+aDXPw3ppGQK6X6NAY99Q59qOG1RD+nqPaj TMAJmCI3A1vtf9pUAZ8HHSMeFm7tKqb5X5tg8EyIQyiXaX3Ze0sWKx2c7BwdMR3zXLlO Flc6JoyCcBD0gocv0oBzKNt29/JZDJWQwRWv1KaS3AxkUwi8q8XouAE62TNwEewL4Dtw QA6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681141010; 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=j0lS4y87u2lIutmurnUklvyGxszOKnqNHaTXkdx8xBk=; b=AtpJUNde3LFArzn0SehKOL+XIhxGUFatJh7ovz1nyTLnDxAxqcMjwzxKOf+QAFJI6N kulwFZXffvqkxx8p/5wqzXc3O/wtn0nQJeCWNTmpDfl3hjIHhlKvP1E0BqOM+E5D2vep ylJ7lo8xxnpQYlKZ8OPxCKt2RrVmV6RijFjbJoyR6xgzC6DDC0Dc6PD3w5YK0P6cYP3A aIX8dN5+O8mc2TmR0bWdNl4Mb1C98V44jRWvgWFUqvV6K7f9bao9lfW2h24imsAuKHL6 tmC/g5GYGe11puGNV6sEJKTYQ022laGUFkPNAfzU4clYHXn5l9CxqIddn9NqI4pwwqOj Iv6w== X-Gm-Message-State: AAQBX9cyorwcekqwPcncrHVbEKG59OHy7jU5/nYOVkQwDWX1/kUJqtGt Sx27T/+Hz1qsfA0B0BLvkLWOEZ2ewEdwLF5XLGI= X-Google-Smtp-Source: AKy350bKksTmVQH8dMywmX9279K885ywvQR6jkLojF8kioJ7E0ihLCJZkPxXZ3u46EBkWeB+exw6knVirnawvnsH6aM= X-Received: by 2002:a67:e08e:0:b0:42c:39f8:300a with SMTP id f14-20020a67e08e000000b0042c39f8300amr4915857vsl.3.1681141010126; Mon, 10 Apr 2023 08:36:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 10 Apr 2023 12:36:14 -0300 Message-ID: To: =?UTF-8?Q?Ond=C5=99ej_Mirtes?= Cc: "G. P. B." , PHP internals Content-Type: multipart/alternative; boundary="000000000000b9da8605f8fd2454" Subject: Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading From: deleugyn@gmail.com (Deleu) --000000000000b9da8605f8fd2454 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 10, 2023 at 10:01=E2=80=AFAM Ond=C5=99ej Mirtes wrote: > I don=E2=80=99t like the proposed function names: > > autoload_register_class to me reads like =E2=80=9Cregister this class for > autoloading=E2=80=9D. If I observe the intended meaning correctly, it sho= uld be > called =E2=80=9Cregister_class_autoloader=E2=80=9D. > > Same for autoload_register_function - better name would be > =E2=80=9Cregister_function_autoloader=E2=80=9D. > > Other functions should be renamed accordingly. Function names should read > like a sentence, like a command. > > On Mon 10. 4. 2023 at 14:17, G. P. B. wrote: > > > Hello Internals, > > > > Dan and I would like to propose a new core autoloading mechanism that > fixes > > some minor design issues with the current class autoloading mechanism a= nd > > introduce a brand-new function autoloading mechanism: > > https://wiki.php.net/rfc/core-autoloading > > > > The existing SPL autoloading functions would become aliases to the new > Core > > ones and will continue to work without any migrations needing to be > > performed. > > > > Hope to hear your opinions about this! > > > > Best regards, > > > > George P. Banyard > > > -- > > Ond=C5=99ej Mirtes > I'm guessing autoload_* was chosen because PHP internal functions are bundled by prefix and register_* would not make a good bundle name for the autoloading functionality. What helps me when thinking about PHP internals function is to assume the first word is a class, such as: $autoload =3D new Autoload(); And then everything after the first underscore is a method name, such as $autoload->register_class();. What I can recommend in this case is to make them autoload_register_class_loader() and autload_unregister_class_loader(), but prefixing everything with register_* would be essentially $register =3D new Register();, but register what? --=20 Marco Deleu --000000000000b9da8605f8fd2454--