Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102349 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80745 invoked from network); 21 Jun 2018 15:32:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2018 15:32:51 -0000 Authentication-Results: pb1.pair.com header.from=php-lists@koalephant.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php-lists@koalephant.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain koalephant.com designates 206.123.115.54 as permitted sender) X-PHP-List-Original-Sender: php-lists@koalephant.com X-Host-Fingerprint: 206.123.115.54 mail1.25mail.st Received: from [206.123.115.54] ([206.123.115.54:57930] helo=mail1.25mail.st) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/D1-32156-F15CB2B5 for ; Thu, 21 Jun 2018 11:32:49 -0400 Received: from [10.0.1.4] (unknown [49.48.244.43]) by mail1.25mail.st (Postfix) with ESMTPSA id 496A76057E; Thu, 21 Jun 2018 15:32:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) In-Reply-To: Date: Thu, 21 Jun 2018 22:32:35 +0700 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Nikita Popov X-Mailer: Apple Mail (2.3445.8.2) Subject: Re: [PHP-DEV] [RFC] Typed Properties From: php-lists@koalephant.com (Stephen Reay) > On 21 Jun 2018, at 4:59 am, Nikita Popov wrote: >=20 > Hi internals, >=20 > Bob and I would like to present a new typed properties proposal for = your > consideration: >=20 > https://wiki.php.net/rfc/typed_properties_v2 >=20 > The proposal allows you to annotate properties with types, which are > enforced at runtime. Unlike the previous RFC on this topic, the new > proposal also supports typed static properties and references to typed > properties. >=20 > Please note that next to the main body, the RFC also contains an > "Alternatives" section, which explores the problem space and considers > trade-offs of different behaviors in some detail. >=20 > Finally, while this RFC currently targets PHP 7.3, this is a large and > complex proposal and we may not be able to meet the deadline, in which = case > this feature will go into the next PHP version. >=20 > Regards, > Nikita Hi Nikita/Bob, I=E2=80=99m *really* happy to see someone taking another stab at this. My only =E2=80=98input=E2=80=99 as such, is around the decision to omit = `callable`. Given that we *have* Closures (thus allowing a developer to = explicitly state that they want something they can invoke regardless of = context, if they so wish), I think `callable` should be a valid type for = properties too. The language doesn=E2=80=99t prevent floating point math = because you might not get the result you expect - it simply documents = and warns people that they need to be aware of some inherent attributes = of the feature. Whether that particular aspect of the RFC changes or not, again, thank = you both for working on this! Cheers Stephen