Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123617 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 4FD9E1A009C for ; Sat, 15 Jun 2024 16:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1718468341; bh=gZMYtiLq+vgzbrZGusKIrNhA0JG35PabS3L6lwYM0uc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=QWPBOMq+8PDcWVcz9AgQCc65fhbc2ugCrpxIPgms7+FdmVTnj0YDTfeB08a8nAj2V kj5cpEP4Gsft2WD9RyBI14YBk+MFPsxNGdZDgxBIKO3rgRNye1snscwkSbRf4lVbeP 9J/vGo1kwDCtOUkAdAeXgKizLFgdsrhnsYXbp9YS9WH+g2CxlszjCyv6dRoIH/aGih VUsuuQVaCPwNw+sluDG+Zp3CfM55koguANviuG7JtfaE5k7cXZ09uDTl8QdwYgRQp4 zswkiYCJp8r8oyD9h8mG6X7lZb71EH5tJ8wnC0WV7kqSN6X2Yu9JoFbtpd2HnW0vQe p3uLWvkHAbtfA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CA33718056A for ; Sat, 15 Jun 2024 16:19:00 +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,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,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-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 ; Sat, 15 Jun 2024 16:19:00 +0000 (UTC) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4217d451f69so26271105e9.0 for ; Sat, 15 Jun 2024 09:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1718468268; x=1719073068; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=J+fBZDjfq9bf3pA7dk2ZUyz5qa9dIwXzgM+lYDBKewY=; b=suJayW7P1ubctk60oFFa+1E8vuE8Q4S0ft6x48wiAbmQUM7l27F5jjr8u4XEznZ9Ff kFZUdjcLlMxIfU+9p4OXpEpqJbS3Qy97WVM7OCjyMd219dGJ+SYtNapx4k+nadRpmnfn 3jie+o74pmLHOMvoBWTZaxp3YHqx+U6liA3rsTbSaKL7ta8QiZ1i5IYHbq+XTmiBaq7Y gAzGF5GtuBQVzX9L/n9IhvcIicdNKRKZTw4hsYlmhyN0q5S7azWTSVgk1l6Rtp+PdLTn tcYO08BufxXWiCX8MvBx1e/6Z/AmjjcNuRcJ+3oTRjP5cfJKw/QmG8ZPmb8UPxqrpmsi 8wlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718468268; x=1719073068; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J+fBZDjfq9bf3pA7dk2ZUyz5qa9dIwXzgM+lYDBKewY=; b=Bsxuzji+7xmZYbrasEN1nNZ/0ZjT/aQoztfU2rZ0QQvkVXqoiPBK1r0AKbMBvrBosk rctSzhBcHhmdGk5QI+rdpHXeA76qMOsCEUmcHTszvBsqYGNpivJ79inUPlDpcSYYAdm7 nWvJfi6QBLUA1dxllYIQJr6eckbR4Pz7pIOdyH2KnIrR1BgS+e2+daL5BHZn1WIIVu25 2Tfeu1yRoOB1MyWZ0TeE51uTyW2xeuXk42F6l6xbxe/sLhyPkP1MrjtVbAUSSbK1MJKt jAdZElUZmu4gf4lE7clKQA9/ZSiWkgBuDY9ZL7zeUtK+XMwD5RtOCpU7FVuzkiAsJ9XZ vKIw== X-Gm-Message-State: AOJu0YxKudRFH5KQvHkk26YZvUdfrtpg1IyFt69H1KLMJIf53B+NWFfN RkZFFcDx9ZxrvgOgSj1S+EHGM7PIwVZlprlUYtOf+HQC5uLDjGQ9i7IBeOgPsVjeF/svj55ha1f tNNU= X-Google-Smtp-Source: AGHT+IHHVF52/ilLV9wzpv14Ouuh4lR2qdK2/Q16zhJAeHhseD43r/3mbbHy8Au69RJJ5WhG7iH8EA== X-Received: by 2002:a05:600c:3d13:b0:423:2ea:fdb3 with SMTP id 5b1f17b1804b1-42304827b93mr43816585e9.14.1718468268301; Sat, 15 Jun 2024 09:17:48 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:7030:8554:1648:c9b4? ([2a01:4b00:bf09:5101:7030:8554:1648:c9b4]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-422f6419e38sm105282665e9.39.2024.06.15.09.17.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Jun 2024 09:17:47 -0700 (PDT) Message-ID: Date: Sat, 15 Jun 2024 17:17:46 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Static class To: internals@lists.php.net References: <0cf69a14-f1b5-4077-9d91-d7b579485eec@scriptfusion.com> <936e1aa3-48cc-4552-9f68-676ebcdeb596@rwec.co.uk> <1fc2f2d0-718f-45ec-8968-b66a1bde686e@scriptfusion.com> Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: bilge@scriptfusion.com (Bilge) On 15/06/2024 16:58, Rowan Tommins [IMSoP] wrote: > Common arguments against: > > - Static properties are a form of global state, and that's something > widely advised against Correct, but a static class does not need to have any state. Indeed, I cannot think of an instance where I (personally) have needed state in a static class. If this ever becomes a point of contention (though I doubt it would), we could even consider prohibiting state in static classes, locking it down completely to just methods. A draconian option, but an option nonetheless. > - Static classes without any properties would be the same as putting > functions and constants in a namespace, which we can already do You already provided a counter-point to this; we can't autoload functions. Besides, there may be good reason (organizationally) to group sets of static functionality together (in a class) rather than having them as free-standing functions only so grouped in a file (which does not necessarily imply the same degree of cohesion). >> rather than fall back on the opinions of many who are mostly absent >> among those polled nine years ago, I'd rather get a sense of the >> current sentiment of those present today. > > This line of thinking always makes me uneasy. It lends undue weight to > *who* made decisions, and not enough to *why*. Meaning no disrespect to anyone whom was participating nine years ago (I have nothing but respect for those whom came before), I really don't care _who_ fielded opinions or decisions, my point was simple and singular: that even if an opinion was valid back then, if nobody were to uphold it today, it wouldn't carry any weight now. I think enough time has passed that gauging the sentiment of today is valid and worthwhile, especially if it has shifted (and we cannot know without asking). Cheers, Bilge