Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123648 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 0B1141A009C for ; Mon, 17 Jun 2024 14:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1718635390; bh=Cf+p2+2R4vZVf7VPl6U6TSNUci5gf3iNLYGxLMfdZ3Q=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=iaED1YTC0zHrmUO609rvkaHj1Hj1Su4t8JKaZj1D8FJ9nEPcNOc602TLauRrLPzTD iY9MsBb4Umt88fsVGfMkd4H4yrcnjAVxYWV53SyJrvv6sM5bUrihd1VUkyDcDDCHoH 1u+VeD0dYfJKEEdUA+TAt2EY34eAw6PN87ftVuXXbZL2IQaQhWG8izCLU/KndztyOR rQVP1/hLoTDkqHm1LGNz9TEfv+k4SMbOPK7Sd6bdy79K2duad5WG9CuUH7NN5i1+b7 LQir5q+n9dx+Zr8Ld76be2E0rPmit/Hbvgvp8nOOpoglPzJDp/YgMXMEQ610ivxRoU iYRPfTGir1Xpg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CE11B18005C for ; Mon, 17 Jun 2024 14:43:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 17 Jun 2024 14:43:09 +0000 (UTC) Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-63152a07830so35807187b3.3 for ; Mon, 17 Jun 2024 07:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20230601.gappssmtp.com; s=20230601; t=1718635317; x=1719240117; darn=lists.php.net; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=jr8fCqCwZPEOoa0BYj/7jcLZO8qY17wts+AEECsxVhc=; b=EMxxCdKVe9rEQaj/atM8KOkwLO7u/mBQ/vQEhw8xHk/YPwCBuBu3C13rwaF012/PJN EeihcoMJwL8NRNzPhMKvoc1e6bJsvKGVFuROD2e3+18xcvyFaAA9ohXO/73rS+AuKDdk Qotam65B58vg8rQ5V+Xpoiq/FAEOh2vt/ta6seatPtIcO7NUyEiQQSR8vy+S77c3oBrK dK3ozB8GQHp5y+M1b7ZPmzVMWqCmCnW6Ue9M9dK3+kfcoBGqOX5EpKmAW1XpqRW+6tp5 X8BTm8eY3PN0fwFEXZmKov3qVkddOLjkD9yKmLhsv0Qn/tRE6+EwAPW00iABNZ2W8R0P pkrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718635317; x=1719240117; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jr8fCqCwZPEOoa0BYj/7jcLZO8qY17wts+AEECsxVhc=; b=TvHVycIN9+OsTKvKZo1IVsvgjvVgULUZHlyDZXLS93NhDe5AoPCF6iJCw9zNtrhG9b F8BVv0LPmqh21Gnp/cofjCpyJ2i2EFRq/WdeeRW1HYLrjqV65OkZnfed/RJMNQkqembK RjP6fINdE6lkKnUz0it56L58kFyMOEFLpEkmDQwX/fch+QgB2Z1lJc8KAUf9rbq/75pL i5DEYsRk+XB+UnUw7huxq8iCaXdSx95BeJaYCwvRiMzI7w3a87NA+2rDPuIvNi6K9H4/ BMHQMoTtvBISdZI9CP4clKAb4ugoSX+iQ2aFzqFquX955qDiK5mrvZ5dMHNJMgM7ApDO Yuow== X-Gm-Message-State: AOJu0YwBH5Y+zlpaf9wkWZGqR+RBxeUbsjhOUV4FfWAiqstwGlBK51MI z5flDRqI/kLpGxQ7Xqr0Ty5Dz1GOspszPMWpWV/n0CFVp9ZWOvAgrGmy6djwE9xgOUuwtcBjTOw NCBU= X-Google-Smtp-Source: AGHT+IGfnPFd0JU8vtEp0NXjA7ZdyS0BSOT+3GXSed/7BgRXUb+LE57bT4I8SGMORcBm+hYTawlgJw== X-Received: by 2002:a05:690c:7003:b0:62f:90df:fae3 with SMTP id 00721157ae682-63222a57b56mr92056047b3.20.1718635316421; Mon, 17 Jun 2024 07:41:56 -0700 (PDT) Received: from smtpclient.apple (c-98-252-216-111.hsd1.ga.comcast.net. [98.252.216.111]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6311af07d97sm14359087b3.135.2024.06.17.07.41.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2024 07:41:54 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_B0F69558-DCDD-43EE-9A56-6EF15D045034" Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: [PHP-DEV] Static class Date: Mon, 17 Jun 2024 10:41:54 -0400 In-Reply-To: Cc: internals@lists.php.net To: Bilge References: <0cf69a14-f1b5-4077-9d91-d7b579485eec@scriptfusion.com> <936e1aa3-48cc-4552-9f68-676ebcdeb596@rwec.co.uk> <04ae10a2-ceae-4996-a7fe-9b38d2f81ca2@scriptfusion.com> <82601236-3228-491E-B776-457331B41C6B@newclarity.net> X-Mailer: Apple Mail (2.3696.120.41.1.8) From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_B0F69558-DCDD-43EE-9A56-6EF15D045034 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jun 17, 2024, at 8:54 AM, Bilge wrote: > Furthermore, for absolute clarity and the avoidance of doubt, I = believe this guiding principle can be enshrined on the following single = sentence: >=20 > "We cannot remove features from a static class that would = otherwise be present in a standard class." >=20 > I believe following this principle we will arrive at the best = implementation of static classes >=20 A great principle, yes, but needing a small caveat: "...excepting features that by-nature are not relevant to the static = class use-case, such as instance-based magic methods like `__get()`, = `__set()`` and `__construct()`." That might have been implied, but good to make it explicit. -Mike --Apple-Mail=_B0F69558-DCDD-43EE-9A56-6EF15D045034 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
On Jun 17, 2024, at 8:54 AM, Bilge <bilge@scriptfusion.com> wrote:

Furthermore, for absolute clarity and the avoidance of doubt, I believe this guiding principle can be enshrined on the following single sentence:

    "We cannot remove features from a static class that would otherwise be present in a standard class."

I believe following this principle we will arrive at the best implementation of static classes


A great principle, yes, but needing a small caveat:

 "...excepting features that by-nature are not relevant to the static class use-case, such as instance-based magic methods like `__get()`, `__set()`` and `__construct()`."

That might have been implied, but good to make it explicit.

-Mike

--Apple-Mail=_B0F69558-DCDD-43EE-9A56-6EF15D045034--