Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121738 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40821 invoked from network); 20 Nov 2023 21:21:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Nov 2023 21:21:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E73E818003F for ; Mon, 20 Nov 2023 13:22:01 -0800 (PST) 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.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (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, 20 Nov 2023 13:22:01 -0800 (PST) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-5a87ac9d245so53679267b3.3 for ; Mon, 20 Nov 2023 13:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700515317; x=1701120117; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=laR6IqX9gOWxYx2hxzTW8JHb0I+/vDq0sQVk07j8p1Y=; b=Rd3lygGfwjjicHIWuHm5k64SvkAV64NC4OFWPko4kdf+vygGZL0HLhes/0cb1r3KDl bldTHcrylW+9iTyN3Z1TuO5dORmmsrmZlEDeBeumXBIYn2qeMBe1YgQqn3Xu4JqHW832 Y9io3aLHG0qK8lEmQX+mODsOREqRFrWiDxcxIV2uUSCJfYODryluz3d5s+h+pCwmS5Kb dVUu7SiiL4y2lf+lZB9G/HMUUW1yk/6eIYKNgzMOscZopgjFI0/rIgpU+dPxmmmqCGe6 EbSnjtZ4bxLHgJH3HDcxLl1UExvKqk6RhrBJO66wSthMQAD6z7mMqW1BtFg9UGoHeqIp /OGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700515317; x=1701120117; 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=laR6IqX9gOWxYx2hxzTW8JHb0I+/vDq0sQVk07j8p1Y=; b=w/rNsQ6kRlqvgrkQl7fb9XlIpmGdLDBqn4Le/kY9cr53yqHIVBqRJABjgaMMwlfJJ7 pWlxgNBJCWdd697pKJ8+BPM9NA3/9RS1KRChxN6VeuED/aDHQjRKsHsFvVpe9dkeuXHw +pdpRZYH49XUgRb3M7nzRNPUMCSdvbrftva2HtPSqEAL1eGjHKIiN/huNIyGqWdUTRAY uWY0IgjvdGybnkjRNgy0lDxVBMhqTGp5HwwKnBiN5eNRq2yDhe6WUkOP0bu8XJmTKIIr FsawnLFNED8Ts0VG1gFQUyqDENh/YcVqqO2WrbId1JVlqC7lXenKoLGAZRGI+3dep3kZ OkxA== X-Gm-Message-State: AOJu0YwrHgJM6GjPx/e83adZRBKsl6yKWeshap0nAh6eBF5nrkVq9PV2 dQVfyeS12msaeqWTldjFHkaivePOz5P6ztav0qNnAfgjQ08= X-Google-Smtp-Source: AGHT+IH+UGuA1CS3OT9V3h6PnMUiu3SVu15i0Ny0zJAoITooZaK8dkcc6qtCwb8cAU8n0PYKOB6qMynB0vjHvxA9TNE= X-Received: by 2002:a0d:c7c6:0:b0:5a7:b723:8fa3 with SMTP id j189-20020a0dc7c6000000b005a7b7238fa3mr8396370ywd.26.1700515317695; Mon, 20 Nov 2023 13:21:57 -0800 (PST) MIME-Version: 1.0 References: <79d675e3-95b4-40bb-baf4-3e1c998f5390@online-presence.ca> In-Reply-To: Date: Mon, 20 Nov 2023 22:21:46 +0100 Message-ID: To: PHP internals Cc: Lanre Waju Content-Type: multipart/alternative; boundary="000000000000724a5e060a9c13f1" Subject: Re: [PHP-DEV] RFC Proposal - static modifier for classes From: tekiela246@gmail.com (Kamil Tekiela) --000000000000724a5e060a9c13f1 Content-Type: text/plain; charset="UTF-8" A class with a private constructor can still be instantiated. A class that cannot be instantiated is pretty much useless. A static class would be just a collection of functions. And I know that many developers write such classes but it doesn't mean the language should encourage it. After all, if someone wants to create such a "collection of functions" they can already do that and they don't need a static class. By definition a class is a template for creation of objects. Everything in PHP OOP is designed with this in mind. Adding static classes would be a severe complication in the language syntax that goes against the OOP principles. That's like saying that some people use a saw to hammer in nails and we should designs saws that make it easier. There are so many unanswered questions in this proposals without even considering things that might be implemented in the future. Such an addition would be a major change that could have unforseen results. And by the way, you are not going to win anyone's approval by being rude and condescending. --000000000000724a5e060a9c13f1--