Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123646 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 B51BF1A009C for ; Mon, 17 Jun 2024 12:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1718628643; bh=XnXDLlzvHpZHzOuYRMNjGFcwE/oTEyRruc+VqOC0i2k=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=V63KRYBg+sRspTokdd5fAnZswFjQzw/746KAuCM34YGwV27y8vbI0N9EM9h9n/r4T EqQyZLYT1HTSDkJwzaTUz+y5lrjgmIlAlp3pUMhTCgxKT0lppbrLMCTCwUCKurmdGH SbpHrinlZQRKdlkIvL7Bh5aOhiuD6mp3j1h7DaOMr8nI++YhlhabS0aD4iAFxGPxwO OdFKrzrkU3OEoizzacIGeGDGSfcBmU1A2On8+h8MSbgvtklSmmfnUPrzSCtHS7MfMC iwd+gqP4zJOrdsUXPtxolGG4NIJrOT/6PGGPmM7D4UoGtZ6BGsztoHZ92DGGT/4GtZ UN++ASQ3zMkDg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6A37E180003 for ; Mon, 17 Jun 2024 12:50:41 +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_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-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.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 ; Mon, 17 Jun 2024 12:50:41 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52cc129c78fso277733e87.2 for ; Mon, 17 Jun 2024 05:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1718628567; x=1719233367; darn=lists.php.net; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=8qjc/H6sQr3K4K/jZgorZQ7DmLhUO6C0Iq7Ak1tnRPw=; b=AAfftPJGNoOIWtqnQu03SiIkn9bDmlyiWGuiGBIRDztvAUDPZpEkGZhQcP4guTtONO uHqkrk3Z9faHQvQp0F6mGUfJH8udOxRbH+DZaH9PrfFTwXh859WgH8MC2InNyK7vGIkh +MJntSnN+Qh1A6zAM0iIRLcYgBLAnB9MbvN8B5cxcGY2+CXB8VTGU3ebD/ZsroToICqs s9wHCBeXRQqH072omFEpugxmEEX+tZjOP/AsXNp8UXdaDLUA1x90FbEefYgg6nxZ0joo sjaRBl/2l1a7WAogaDHOkApi1Wvcs2y/IUF04VMC5p8Uvxyp+GvK4hX5CTh3RbxN5WxQ AmJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718628567; x=1719233367; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=8qjc/H6sQr3K4K/jZgorZQ7DmLhUO6C0Iq7Ak1tnRPw=; b=ZX0aal2rMYOpt+fmCSAiHOkoroTvwZz0jN6HG3bjzsUOvoeTJ3tZoHEYeCykJo5ihr 1eMRHLLNnhkfe/Mg3nMWUy+4jeg6Uejml6B5O36xfKGsfzJEoUullLK9UUpnE9hfhSyz 84jLSS3HUvzPJthNuuCaK10pHwVKpdJvVN9CxK5GnimbylJX6gFTginW4IgdDSiMKg8B R1EW0sfMLNtISqi68pYboPmVL0jUdk//9q8KRJfy/KixkhXO+lBbqTwpgQUdgw0YG4hc 8l/IiaA7DicULTd/fftxjpq2lngt8JvsYM1Ujn4F5HMj9/fUMO4BNjq05k9JFSBhsczA Gq8w== X-Gm-Message-State: AOJu0Yyg2dpYuHIZ+qvc9mDn2Pu09fbruKMoobqX2JsPTQWyEtz8kZaB TBPlQclt19gQb78CQOFhWcU6YNyE+oTEwTuRbAMNnhRYkBkR7lE06lJC+vy2WiJw3v+JFEa+1o+ LFEc= X-Google-Smtp-Source: AGHT+IFrthtMEhSkQK86kaToMy4xTKFa0xHhY5CTAx6vEETjlpoDI5UTtgUbbccNQAujpm36TYkrog== X-Received: by 2002:a05:6512:3b22:b0:52b:9037:9966 with SMTP id 2adb3069b0e04-52ca6e946b0mr8262581e87.46.1718628567372; Mon, 17 Jun 2024 05:49:27 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:59f9:59da:99bf:b5e1? ([2a01:4b00:bf09:5101:59f9:59da:99bf:b5e1]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-4246b67f0aesm27236635e9.45.2024.06.17.05.49.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jun 2024 05:49:26 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------ZeA625N0NVerVJhTeceHWzdc" Message-ID: Date: Mon, 17 Jun 2024 13:49:26 +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: Mike Schinkel Cc: internals@lists.php.net 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> Content-Language: en-GB In-Reply-To: <82601236-3228-491E-B776-457331B41C6B@newclarity.net> From: bilge@scriptfusion.com (Bilge) This is a multi-part message in MIME format. --------------ZeA625N0NVerVJhTeceHWzdc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 16/06/2024 14:32, Mike Schinkel wrote: > > Not supporting all features used in the wild would result in > developers not being able to use static classes for new and/or > refactored code if they believe they need those excluded features. > This would stop developers from signaling their intent to readers > of their code and would stop developers from being able to rely on > reflection to discern static classes for new and/or refactored > code when that otherwise could have been possible. > > Disabling existing features just for static classes would result > in creating two forms of static classes — explicit and implicit — > and that IMO would be a miss for the addition of static classes. > You wrote the perfect words. Even if I do not agree with all of your six conclusions following, I agree with this preface 100%, to such an extent that I think it should form the underpinning basis for all further decisions on this RFC and be enshrined in the preamble of said RFC, if indeed I ever acquire such permissions as are necessary to actually write it. The idea of "implicit" versus "explicit" static classes is a clear and powerful one that I think we can all understand, such that a successful RFC would collapse this distinction; any failure to do so would undermine the value of the feature entirely. As a concrete example, then, prohibiting state in a static class is now completely off the table simply because regular classes already support this feature. Whilst some people have talked about idealogical aspirations for this feature which sound valid in a vacuum, we must primarily concern ourselves with the fact that this feature is being introduced into an existing language, not a brand new language where such ideals would have merit. And that is why this statement is so powerful: most (but perhaps not all) of the answers to these disputed questions follow naturally from the clear and guiding principle of this preface. Thank you so much, Mike, for this! I feel confident I can write this RFC now, and with help from Lanre, we already have the beginnings of an implementation, too! Cheers, Bilge --------------ZeA625N0NVerVJhTeceHWzdc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 16/06/2024 14:32, Mike Schinkel wrote:
Not supporting all features used in the wild would result in developers not being able to use static classes for new and/or refactored code if they believe they need those excluded features. This would stop developers from signaling their intent to readers of their code and would stop developers from being able to rely on reflection to discern static classes for new and/or refactored code when that otherwise could have been possible. 

Disabling existing features just for static classes would result in creating two forms of static classes — explicit and implicit — and that IMO would be a miss for the addition of static classes.  

You wrote the perfect words. Even if I do not agree with all of your six conclusions following, I agree with this preface 100%, to such an extent that I think it should form the underpinning basis for all further decisions on this RFC and be enshrined in the preamble of said RFC, if indeed I ever acquire such permissions as are necessary to actually write it.

The idea of "implicit" versus "explicit" static classes is a clear and powerful one that I think we can all understand, such that a successful RFC would collapse this distinction; any failure to do so would undermine the value of the feature entirely. As a concrete example, then, prohibiting state in a static class is now completely off the table simply because regular classes already support this feature. Whilst some people have talked about idealogical aspirations for this feature which sound valid in a vacuum, we must primarily concern ourselves with the fact that this feature is being introduced into an existing language, not a brand new language where such ideals would have merit. And that is why this statement is so powerful: most (but perhaps not all) of the answers to these disputed questions follow naturally from the clear and guiding principle of this preface.

Thank you so much, Mike, for this! I feel confident I can write this RFC now, and with help from Lanre, we already have the beginnings of an implementation, too!

Cheers,
Bilge

--------------ZeA625N0NVerVJhTeceHWzdc--