Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97048 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42821 invoked from network); 19 Nov 2016 14:52:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2016 14:52:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.103 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.103 blu004-omc2s28.hotmail.com Received: from [65.55.111.103] ([65.55.111.103:51402] helo=BLU004-OMC2S28.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/62-31303-C0760385 for ; Sat, 19 Nov 2016 09:51:58 -0500 Received: from BLU437-SMTP32 ([65.55.111.72]) by BLU004-OMC2S28.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sat, 19 Nov 2016 06:51:53 -0800 X-TMN: [/mmHB6hXJEv/VckH0dClcmLpOf3nGmps] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: Date: Sat, 19 Nov 2016 15:51:48 +0100 CC: "Pascal MARTIN, AFUP" , PHP internals Content-Transfer-Encoding: quoted-printable References: <576C4FE2.3090508@pascal-martin.fr> To: Rasmus Schultz X-Mailer: Apple Mail (2.2070.6) X-OriginalArrivalTime: 19 Nov 2016 14:51:51.0661 (UTC) FILETIME=[765CF9D0:01D24274] Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: bobwei9@hotmail.com (Bob Weinand) Hey there, I=E2=80=99ve actually been working on an implementation covering also = typed references, so that it=E2=80=99s possible to create references to = a typed property, which had been a major concern back then. See also: = https://github.com/bwoebi/php-src/compare/typed_properties...bwoebi:typed_= ref_properties I=E2=80=99m planning to revive the RFC soon. Bob > Am 19.11.2016 um 15:04 schrieb Rasmus Schultz : >=20 > Heh, so, this week, a coworker of mine started using PHP 7, and he = calls me > over, and he's like, "I don't get it, I had heard PHP 7 was supposed = to > have type-hints now - it worked for return-types, but what am I doing > wrong, I can't seem to get this to work for properties?" >=20 > He actually had something like "public int $id" in a class-declaration = on > his screen, and was genuinely confused - he simply assumed that would = work, > since it worked for return-types. When I explained to him that, no, = PHP 7 > still isn't type-hinted, it's *more* type-hinted, but still not fully > type-hinted, he gave me the lemon-face. You know the one. Like you = just ate > a lemon. Yeah. >=20 > I don't think there's a developer on my team and this point who isn't = at > least checking out other languages in frustration with the lack of = features > and consistency. I'm starting to feel like we're at risk of some of = our > best, young developers walking, if somebody offers them a chance to = work > with more "exciting" languages like Scala, Go, Dart, etc. - I'm not = trying > to say that proper type-hinting is the whole answer, but I believe it = would > go a long way towards consistency and the sense of completeness you = get > from some of the competing languages, where these features were = engineered > into the language from the design stage, rather than being added on a = bit > at a time. >=20 > Any plans to revive this RFC or is it officially dead? >=20 >=20 > On Thu, Jun 23, 2016 at 11:08 PM, Pascal MARTIN, AFUP < > mailing@pascal-martin.fr> wrote: >=20 >> Le 10/06/2016 12:38, Joe Watkins a =C3=A9crit : >>=20 >>> The vote for typed properties has been restarted. >>>=20 >>=20 >> Hi, >>=20 >> We, at AFUP, often tend to be on the "more static / strict types" = side of >> things, and it remains this way for this RFC -- which means we would = be +1 >> for typed properties. >>=20 >> A few noted this was not quite "the PHP way", while the majority felt = this >> was in line with previous changes (like scalar type declarations, = nullable >> types...) and could prove interesting for complex applications. >>=20 >> Judging from where the votes are right now, I'm guessing this RFC = will not >> pass, but, in any case, thanks for your work on this! >>=20 >> There are more "yes" than "no", so maybe it will open a path towards >> something, maybe a bit different, in another future version... >>=20 >> -- >> Pascal MARTIN, AFUP - French UG >> http://php-internals.afup.org/