Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68444 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22995 invoked from network); 8 Aug 2013 15:16:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2013 15:16:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.173 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 74.125.82.173 mail-we0-f173.google.com Received: from [74.125.82.173] ([74.125.82.173:41016] helo=mail-we0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/F5-06453-356B3025 for ; Thu, 08 Aug 2013 11:16:35 -0400 Received: by mail-we0-f173.google.com with SMTP id x55so2643210wes.18 for ; Thu, 08 Aug 2013 08:16:33 -0700 (PDT) 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=pTh2WWXOnbJi3WXU+ZTdN6Ok/0WlLTsB+AHd4Lp3CfE=; b=TLFHuYtyFC9dWjCJO43hqrMaLarDvs+joSc2/y5lRSCtUyWy20ubchuwnmRshfxLQV 1hWbBHcp9AmKSims/JBBQMJEoF/7hR02sMZ9BvibdoWpnJbZ5EzUGHDmgceYB4H7gsjy s/LeHDcoti4aJlPEawvtAOuM+dhHZoP+yWDiqsLUQqsUcu3ywMHIp0eCSiTEriPxWTrT 1qJYRZzyjO1c19eMz8MT4vgtBWbParVRPdDTst8ZAji628g4gcK/exQjbjQoGBpzLRlu p/qVEY+RyPDlgAJICniOI1n9eNZgedZKuoGZwffBMTG1c6GdDN7mSPDE7dcIFNIb2Cz8 SQvA== MIME-Version: 1.0 X-Received: by 10.194.219.233 with SMTP id pr9mr3704494wjc.8.1375974992978; Thu, 08 Aug 2013 08:16:32 -0700 (PDT) Received: by 10.216.182.193 with HTTP; Thu, 8 Aug 2013 08:16:32 -0700 (PDT) In-Reply-To: References: <52037411.7070406@seld.be> Date: Thu, 8 Aug 2013 16:16:32 +0100 Message-ID: To: Matthieu Napoli Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a11c1b7e6ad29da04e37124a7 Subject: Re: [PHP-DEV] RFC: constructor argument promotion From: leight@gmail.com (Leigh) --001a11c1b7e6ad29da04e37124a7 Content-Type: text/plain; charset=ISO-8859-1 On 8 August 2013 14:12, Matthieu Napoli wrote: > class MyClass { > public $foo; > protected $bar; > > public function __construct($this->foo, $this->bar, $baz) { > // $this->foo and $this->bar are now set > This actually feels _way_ more intuitive to me, it feels like you are passing the parameter directly into that property. With that style, why even limit it to the ctor? function mySetter(array $this->items) {} --001a11c1b7e6ad29da04e37124a7--