Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64534 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68784 invoked from network); 4 Jan 2013 23:31:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2013 23:31:20 -0000 Authentication-Results: pb1.pair.com header.from=steve@mrclay.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=steve@mrclay.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mrclay.org from 50.22.11.19 cause and error) X-PHP-List-Original-Sender: steve@mrclay.org X-Host-Fingerprint: 50.22.11.19 bedford.accountservergroup.com Linux 2.6 Received: from [50.22.11.19] ([50.22.11.19:51125] helo=bedford.accountservergroup.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/44-38386-54667E05 for ; Fri, 04 Jan 2013 18:31:18 -0500 Received: from ip68-101-74-66.ga.at.cox.net ([68.101.74.66]:49745 helo=[192.168.11.24]) by bedford.accountservergroup.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1TrGjK-000GCH-Qx; Fri, 04 Jan 2013 17:31:15 -0600 References: Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: <19D80B01-BE88-4119-8A15-B631A96060E5@mrclay.org> Cc: PHP internals X-Mailer: iPhone Mail (10A523) Date: Fri, 4 Jan 2013 18:31:15 -0500 To: Nikita Popov X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bedford.accountservergroup.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mrclay.org Subject: Re: [PHP-DEV] [RFC] Alternative typehinting syntax for accessors From: steve@mrclay.org (Steve Clay) Would the following two be exactly functionally equivalent? public Foo $foo; public $foo { get; set(Foo $value) { $this->foo =3D $value; } } We should also consider how an author would allow type-hinted properties to a= ccept NULL as a new value, in both proposals. Steve --=20 http://www.mrclay.org/ On Jan 4, 2013, at 9:41 AM, Nikita Popov wrote: > Hi internals! >=20 > I already brought this up before, but I think the discussion at that time > was not very constructive and largely off-topic, so I'm bringing it up > again. To make sure everything is clear I wrote an RFC document: >=20 > https://wiki.php.net/rfc/propertygetsetsyntax-alternative-typehinting-synt= ax >=20 > This RFC proposes an alternative syntax for typehinting accessors, which > will in particular also allow to typehint properties directly, even if no > accessors are used (public DateTime $date). >=20 > What are your opinions on this? >=20 > Thanks, > Nikita