Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68449 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60052 invoked from network); 8 Aug 2013 18:47:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2013 18:47:11 -0000 Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 209.85.215.48 mail-la0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:33510] helo=mail-la0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/AD-06453-EA7E3025 for ; Thu, 08 Aug 2013 14:47:11 -0400 Received: by mail-la0-f48.google.com with SMTP id hi8so2342466lab.21 for ; Thu, 08 Aug 2013 11:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=7YhFscrUoCUdIRqmtlCzQh3bEj0JVEyAbqsBd16zY30=; b=fQVFCQFQH1BuXezvl17N55SlT6J4MUd30VWiV9iuj6gJm9SGqj24GSkB24z/qwyuQ7 vpcC4bdZMk/6lxrw+uHPJPeV3wUCMgERgzhC/PHJSh+PJaqLFcAT331kkHg8xRPoDsgw FO2hhdZQi4EPxQND0f3psQgzqKxr4nExIusZVwePju+Q7K1g8+wn8G8zpmppYohja1bD osIlqz3pONEMru8yd0D0b1cPnhpxczQHEsYGJ6BoHw/DAB0o+btFEFxXVxnDhVVc+p36 FFki3+uhzkB/IoqPHc4HQHJkFye/3trz+AjrEU5nMLqpKv0f1AY+QlE0fqvpZZ+WZUBr EC1g== MIME-Version: 1.0 X-Received: by 10.112.184.135 with SMTP id eu7mr2920848lbc.65.1375987628000; Thu, 08 Aug 2013 11:47:08 -0700 (PDT) Sender: mike.php.net@gmail.com Received: by 10.114.184.19 with HTTP; Thu, 8 Aug 2013 11:47:07 -0700 (PDT) In-Reply-To: References: <52037411.7070406@seld.be> Date: Thu, 8 Aug 2013 20:47:07 +0200 X-Google-Sender-Auth: hgVjsFz0hHNJaOYFcsIsr-Bwsls Message-ID: To: Leigh Cc: Matthieu Napoli , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RFC: constructor argument promotion From: mike@php.net (Michael Wallner) On 8 August 2013 17:16, Leigh wrote: > 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) {} Awww. No :-/ Sorry, I have no more words on that topic. -- Regards, Mike