Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69352 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22027 invoked from network); 26 Sep 2013 12:01:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Sep 2013 12:01:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=bof@bof.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bof@bof.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bof.de designates 80.242.145.70 as permitted sender) X-PHP-List-Original-Sender: bof@bof.de X-Host-Fingerprint: 80.242.145.70 mars.intermailgate.com Received: from [80.242.145.70] ([80.242.145.70:49540] helo=mars.intermailgate.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/2E-46303-12224425 for ; Thu, 26 Sep 2013 08:01:38 -0400 Received: (qmail 11834 invoked by uid 1009); 26 Sep 2013 14:01:31 +0200 Received: from 209.85.212.54 by mars (envelope-from , uid 89) with qmail-scanner-1.25-st-qms (clamdscan: 0.96.2/17899. spamassassin: 3.3.1. perlscan: 1.25-st-qms. Clear:RC:1(209.85.212.54):. Processed in 0.045497 secs); 26 Sep 2013 12:01:31 -0000 X-Antivirus-MYDOMAIN-Mail-From: bof@bof.de via mars X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(209.85.212.54):. Processed in 0.045497 secs Process 11821) Received: from mail-vb0-f54.google.com (gmail@bof.de@209.85.212.54) by mars.intermailgate.com with RC4-SHA encrypted SMTP; 26 Sep 2013 14:01:31 +0200 Received: by mail-vb0-f54.google.com with SMTP id q14so743261vbe.13 for ; Thu, 26 Sep 2013 05:01:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KSXyjImnArljhZ2cJWS2OJ5EjLbPWRwouXl+zreav40=; b=f17dgPRpUq9Sm8HFuhh5sl37i2JS86fb4tLBTy/y9D3OTP5vg1IozWzKquWWPdZbEM N+VMhbQpm/aXNvN0CJBG4EJ6beCig2PeIaGscvOPhf8YWvPVznjgDN6rcE+wgvatz+sU /ddM+aHI3B56Vsv+TBUXWKKgcv9EddJz4DhM3w1yKPv5JMZc3Go3ViQXch9CgrQtx4ak VNPRLpHUh5eqHqT7D2dJY+HTQOdDv0jefsiIyURFjdDghwSs0aErMnztf5T9QRb2nMqs 4Wm1AR2tir97iRuMaKZss69e4QBMow0hE5wEVOd1eTW7uGw/x08F4l2x+kmgwIQoE8y4 hjng== MIME-Version: 1.0 X-Received: by 10.58.77.65 with SMTP id q1mr333433vew.8.1380196889392; Thu, 26 Sep 2013 05:01:29 -0700 (PDT) Received: by 10.52.24.43 with HTTP; Thu, 26 Sep 2013 05:01:29 -0700 (PDT) Received: by 10.52.24.43 with HTTP; Thu, 26 Sep 2013 05:01:29 -0700 (PDT) In-Reply-To: <5244095F.3090005@php.net> References: <5241F11C.5080707@php.net> <008301ceb967$b49ab190$1dd014b0$@tutteli.ch> <524205D8.8000608@php.net> <5242ADAE.2080007@php.net> <5242E88D.90407@php.net> <5244095F.3090005@php.net> Date: Thu, 26 Sep 2013 14:01:29 +0200 Message-ID: To: Joe Watkins Cc: Nicolas Grekas , internals Content-Type: multipart/alternative; boundary=e89a8f6474ed50039804e7482170 Subject: Re: [PHP-DEV] RFC: Anonymous Classes From: bof@bof.de (Patrick Schaaf) --e89a8f6474ed50039804e7482170 Content-Type: text/plain; charset=ISO-8859-1 Am 26.09.2013 12:16 schrieb "Joe Watkins" : > For the following reasons the syntax should remain as it is: > > It is consistent with anonymous function calls - args after definition ... I think it is exceedingly rare for anynomous functions to be called at their point of definition, while the constructor of your anonymous class will alreays be called there. > It does not make sense to pass arguments to a constructor that might not yet be declared The constructor will be called after the full class definition has been seen anyway; where the arguments are put syntactically doesn't change that, does it? My proposal ($that = new class(constructor args) places the constructor args in exactly the same place they are when instantiating a nonanonymous class. best regards Patrick --e89a8f6474ed50039804e7482170--