Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68422 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62627 invoked from network); 8 Aug 2013 04:20:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2013 04:20:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.215.49 mail-la0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:46118] helo=mail-la0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 24/8A-06453-A7C13025 for ; Thu, 08 Aug 2013 00:20:11 -0400 Received: by mail-la0-f49.google.com with SMTP id ev20so1748341lab.22 for ; Wed, 07 Aug 2013 21:20:07 -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=nSRG0BCYJFgoY2RhRgQnY27Ja5qxWvwsLzRCMz1O5Lc=; b=m/uIGfsE31t85Hf5TtCYAKeRdKyOIczBY9I5aVOvA3vuxaBu6H+K6MDodPYLNbC9fi m/fhCVWJ6ithkXYi0PcHGkfk64xCyEWPUbeFrn6FZfFU+Z6y6v9BodMUEIjjx99ljG2x Zf4AF3HcuyrvnOoPV6iipoPRj8psMUs9hrISSKHTBb7bReNer89qcf23Jh7788zBA8nz C195ESvw36taoqoklNdtx2YCn7jSOblLwctYc6aP6YMsAqx72GvErFJYKmrTEOQ9RuIL xO2pqxwh8d2ZJYh0qMXAo12X9owu8E6HjjqGNHs+ysG37xK6yVIY8AIXy55PUmWkZIqo PmPA== MIME-Version: 1.0 X-Received: by 10.152.6.97 with SMTP id z1mr1775812laz.26.1375935607378; Wed, 07 Aug 2013 21:20:07 -0700 (PDT) Received: by 10.114.59.173 with HTTP; Wed, 7 Aug 2013 21:20:07 -0700 (PDT) In-Reply-To: References: Date: Wed, 7 Aug 2013 21:20:07 -0700 Message-ID: To: Sean Cannella Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RFC: constructor argument promotion From: hannes.magnusson@gmail.com (Hannes Magnusson) On Wed, Aug 7, 2013 at 12:47 PM, Sean Cannella wrote: > Everyone - > > Hi! Since this is my first post to this list, I'll introduce myself: > I'm an engineer who has been working on HipHop VM in New York for the last half year or so after a long time working at Microsoft on business software and services in multiple hemispheres. > > I wanted to get the PHP community's opinion on this feature. See the draft RFC and referenced implementation below: > > https://wiki.php.net/rfc/constructor-promotion Using private and protected there seems really weird. From globals scope, I am allowed to set private and protected properties - but just once? I would assume __construct(protected $bar) would only allow a child class to set that property.. which implies the ctor itself is protected. Also, this seems like a very bad idea. You are encouraging "don't bother validating your data" ideas. -Hannes