Re: [RFC] Abstract final classes

From: Date: Thu, 27 Nov 2014 07:19:04 +0000
Subject: Re: [RFC] Abstract final classes
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-79213@lists.php.net to get a copy of this message
Hi! > I worked on an implementation of a somehow controversial concept that > exists in hack and C#: abstract final classes. > > https://wiki.php.net/rfc/abstract_final_class In the RFC, I think one phrase needs clarification: Currently, PHP developers' only resource is to create a final class with a private constructor, leading to untestable and error prone code. What is "error prone" in private __construct(); and how the RFC improves the testability of such class? The vote should be 2/3+1 surely as it is a language change. > My motivation is to further expand class support to add modifiers (PPP - > public, protected, private). I added this change to initially segregate > grammar rules. It was an easy feature without extensive complexity and > covers some use-cases. I'm not sure I understand this part. Could you explain more? -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#79213) next »