Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69266 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99570 invoked from network); 23 Sep 2013 09:09:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2013 09:09:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=linepogl@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=linepogl@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.48 as permitted sender) X-PHP-List-Original-Sender: linepogl@gmail.com X-Host-Fingerprint: 209.85.220.48 mail-pa0-f48.google.com Received: from [209.85.220.48] ([209.85.220.48:49341] helo=mail-pa0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/90-30351-46500425 for ; Mon, 23 Sep 2013 05:09:56 -0400 Received: by mail-pa0-f48.google.com with SMTP id bj1so2030012pad.7 for ; Mon, 23 Sep 2013 02:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=6t46hFVwtXnI4qV7p0hnJT7tka7JZx4bskBD2yrBJng=; b=D2dCoaZ9Pr3lEnItfY5FkAxjUpBbukEXGyTLReJshVPnuFZG9SPCFZxt5c6n+3IPyA 4VpRUq9HPb7RxKjtYuRG9Ms2LkMcWRQ+LYliJGKGScHPGb8W2DmrOL6/unsgD/LhgstR NOCE+6/BeBG7egQolf/FG39hDEmPUXWEQ7b9uDIkchofdJ2AbBjyR4xDkx1ibONSEPSr tVN4DKBIu5rirEmb19Tpoj+cIY52beeIyOQZw5e4Gbl8V5xkrRU7ZJsx1DmAMZESXFQv J0sMmxvA2oQjXSgVT+qm0st1AHhs7kPWwfODYESBz0PDYu+tT2p2L8zw07kiwUGmUNyM bdmg== X-Received: by 10.68.211.202 with SMTP id ne10mr931830pbc.168.1379927392689; Mon, 23 Sep 2013 02:09:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.70.3.163 with HTTP; Mon, 23 Sep 2013 02:09:32 -0700 (PDT) In-Reply-To: References: Date: Mon, 23 Sep 2013 11:09:32 +0200 Message-ID: To: Derick Rethans Cc: Joe Watkins , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8ff1c43a0ea44904e7096272 Subject: Re: [PHP-DEV] RFC: Anonymous Classes From: linepogl@gmail.com (Lazare Inepologlou) --e89a8ff1c43a0ea44904e7096272 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2013/9/23 Derick Rethans > On Mon, 23 Sep 2013, Joe Watkins wrote: > > > https://wiki.php.net/rfc/anonymous_classes > > This RFC misses one very important part: an argument for why this > feature is useful. Syntax changes are likely to be extremely contentious > and without convincingreasoning *why* we need this, we shouldn't even > consider looking at an RFC. > > I use anonymous classes very frequently in Java and in C#, and I would say that they are quite useful. However the examples given in the RFC are really bad ones. Why on earth would you need a constructor for an anonymous class? Anonymous classes are used to implement quickly some interface. Frankly, constructors are not part of any interface. Besides a constructor is totally useless in an anonymous class as it will never be called after the object is created. Let's not rule out this feature yet. It's just a weak RFC, so let's wait for better approaches. Lazare INEPOLOGLOU Ing=C3=A9nieur Logiciel --e89a8ff1c43a0ea44904e7096272--