Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93860 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44406 invoked from network); 10 Jun 2016 12:39:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2016 12:39:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wm0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:38119] helo=mail-wm0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/18-00193-A05BA575 for ; Fri, 10 Jun 2016 08:39:39 -0400 Received: by mail-wm0-f42.google.com with SMTP id m124so100310409wme.1 for ; Fri, 10 Jun 2016 05:39:38 -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; bh=vox5CdfSCkmtwaGzeyvRI8ei376qjKAGT20owR/t/lM=; b=ZVca6hBzoi/lLqll9hXd6B/1sjqjkTxQT3HuYuYQeMLOHO8JhDBEOf6dy6ay9xXhIM 0IaUm+JwJFOtDtYgEC29l0OOX/GuhSwWn1Ti12/FPyXTtX0WW+X7WMZ2oCFYAMlPt3uI BH9HwTAImPXULdEnGacVCo7SfamTZjnbAflXUNXZraxFsQOrH7YAhFv7mYiZtg3zbQXI gNKG4O6V7RoreyS1nYIEMPTzEEsozHxFeOkeeJdPVldEEIC6EDGtdnTJe97JEuKN7vuG 60n9kWilL8jrTS8H7Nyps9LQpc0jL+zq3fd0n449ZsAeQqhLCdSCtyJ7dCOoXLDgRt6s wXbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vox5CdfSCkmtwaGzeyvRI8ei376qjKAGT20owR/t/lM=; b=aT0qumVquNDG6WxV2KxioO4XQcmvNgfNHFfQS7d75nUf/qcUrjMbDqMFjLiyV/ckzZ RjVK5EDDNfF/reB73Q070V3qA+DCxDHUE2TLdstpup+pW51/txRFqPgCq6CrPGGqbsT3 CoTV1bIC674WOrQ11vSfqwY2CtC6U/lcJRcRKJIHxWoFhd2MLd7VMTMZfiQI9CG21gpB gj14mtYRBi4IvMXInXm/Nez33mTRvZ/X8MY3TYQlIguZnpFaqy1dEvv2S7AUqjXvmB1f Bv1Crq8R1ZdIBiqncXiT6TYxFUhGtS7Wf75B+Pzx1YAqv+t9hi3fPEB3EZahAWzXMvjP Lpsw== X-Gm-Message-State: ALyK8tKfYYXt2c3lhaw3ARS+p3nkHFyJ0jG6MnP9jVJHE8HYty8X5lb+BG7RveyQazpsTFh2DXYKZVWTjL+oXQ== X-Received: by 10.28.195.69 with SMTP id t66mr18758321wmf.95.1465562375779; Fri, 10 Jun 2016 05:39:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.163.106 with HTTP; Fri, 10 Jun 2016 05:39:16 -0700 (PDT) In-Reply-To: References: Date: Fri, 10 Jun 2016 14:39:16 +0200 Message-ID: To: Joe Watkins Cc: PHP internals , Phil Sturgeon Content-Type: multipart/alternative; boundary=001a1148f25ccdfce50534ebd4b7 Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: ocramius@gmail.com (Marco Pivetta) --001a1148f25ccdfce50534ebd4b7 Content-Type: text/plain; charset=UTF-8 As already mentioned on twitter, I voted "no" on this RFC as it currently stands. I might reconsider if following points are addressed: 1. __get semantics are not changed: let __get behave like it usually does, and let the user define a type hint on __get, should any be applicable. Basically: class Foo { private int $bar = 123; public function __get($name) { return 'banana'; } // *ALWAYS* works - why would I even want a type error here? } * by-ref access should be enabled when the reference property has the same declared type as the source one class Foo { public int $bar = 123; } class Bar { public int $baz = 456; public string $taz = 'taz'; } $foo = new Foo; $bar = new Bar; $bar->baz = & $foo->bar; // works $bar->taz = & $foo->bar; // crashes Cheers, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 10 June 2016 at 12:38, Joe Watkins wrote: > Afternoon internals, > > The vote for typed properties has been restarted. > > Please take part: https://wiki.php.net/rfc/typed-properties > > Cheers > Joe > --001a1148f25ccdfce50534ebd4b7--