Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79227 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1263 invoked from network); 27 Nov 2014 13:10:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2014 13:10:08 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.173 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com Received: from [209.85.214.173] ([209.85.214.173:40549] helo=mail-ob0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/61-27910-CA227745 for ; Thu, 27 Nov 2014 08:10:05 -0500 Received: by mail-ob0-f173.google.com with SMTP id uy5so3761103obc.32 for ; Thu, 27 Nov 2014 05:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=padgCg8vFhLCDAfq/AZoDqFgUnRpinbHscE4wf/UmCA=; b=wVwxeZpbXjWJ6ydDjow20Oqb+sdczWJ9PwXkYc2q9jI2/9hQN2SNYSoosMrfqI2yJS sTi+6c9oYb71fAkxPWchdb5Ex8nEB0loOpuvp48UNIS5fzyOk9Np0KUrGj8Uxg0OUu1b Zx5XOLDTp/3z+eij2Uop7SQ1hquwiE7Rsp2Y0ibNLLb2OPJg2FRtltRBp0pgL/NBc/AZ qslfKRRljKqsuqyHyaVEA8mi5aFMTjkmXz3FOsAPdfvj2jGOj81W3LAsvEEuP4XpwNfo XxpLJc18dviYddrCcY6sveLttMDXNRSOjvCXYjfDasdf9vAlLVDJUeNS7t9lK0TpnY6h z89A== MIME-Version: 1.0 X-Received: by 10.202.186.138 with SMTP id k132mr21131064oif.99.1417093802441; Thu, 27 Nov 2014 05:10:02 -0800 (PST) Received: by 10.60.37.103 with HTTP; Thu, 27 Nov 2014 05:10:02 -0800 (PST) In-Reply-To: <54771C61.5040507@gmail.com> References: <54771C61.5040507@gmail.com> Date: Thu, 27 Nov 2014 14:10:02 +0100 Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a113cd1f0b542040508d6dca6 Subject: Re: [PHP-DEV] [RFC] Abstract final classes From: tyra3l@gmail.com (Ferenc Kovacs) --001a113cd1f0b542040508d6dca6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Nov 27, 2014 at 1:43 PM, Rowan Collins wrote: > Lazare Inepologlou wrote on 27/11/2014 10:35: > > 2014-11-27 4:47 GMT+01:00 guilhermeblanco@gmail.com < >> guilhermeblanco@gmail.com>: >> >> 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 >>> >>> 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. >>> >>> >>> "Abstract final" is a strange way to name it. What you want is a >> "static" >> class: >> >> * The fact that one cannot initialise an abstract class is only a side >> effect. Abstract classes are meant to be used for inheritance. >> >> * Abstract static methods are not possible (one more reason why abstract >> is >> a bad name). >> >> * A "static" class does not have to be final, given the fact that PHP is >> one of the few languages that offer a robust Late Static Binding. >> > > This has always been my feeling. To me, "abstract" means "must be > extended", and "final" means "can't be extended", so combining the two > seems like a self-contradiction. > > The fact that abstract classes allow static methods to be called without > sub-classing always seems a bit odd to me - it's as though only the > constructor is really abstract, not the whole class. > > A "static" class, however, whether "final" or not, is definitely somethin= g > I've wanted. > > Regards, > -- > Rowan Collins > [IMSoP] > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > for the record I also brought up this argument (abstract and final being contradicting ideas) in the pull request comments(before this thread was created). --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a113cd1f0b542040508d6dca6--