Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91693 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3168 invoked from network); 16 Mar 2016 16:49:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2016 16:49:55 -0000 Authentication-Results: pb1.pair.com header.from=willfitch@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=willfitch@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 66.111.4.26 as permitted sender) X-PHP-List-Original-Sender: willfitch@php.net X-Host-Fingerprint: 66.111.4.26 out2-smtp.messagingengine.com Received: from [66.111.4.26] ([66.111.4.26:34079] helo=out2-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/C6-48430-0BE89E65 for ; Wed, 16 Mar 2016 11:49:52 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 83C0120AC5 for ; Wed, 16 Mar 2016 12:49:49 -0400 (EDT) Received: from web2 ([10.202.2.212]) by compute4.internal (MEProxy); Wed, 16 Mar 2016 12:49:49 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=8sdF3AjEvU0Vxq2 qDCdtBi1P4z0=; b=U4hOY1XOErYNw+YvpeQ6///yBnv08JMqwsQyN//vzrvllHq 2vgeLzU0asejxVJnQhV38c0aUSgnPBcFfHbnfqDGHftTgC7iOZ/LGAzLfnei5tGX xEPtRpru+vAj2Z7qTfrovvsjt7rijx5fib/CBlYpUZF5ESmNXqdFsFA3l0Oc= Received: by web2.nyi.internal (Postfix, from userid 99) id 574ED540BB3; Wed, 16 Mar 2016 12:49:49 -0400 (EDT) Message-ID: <1458146989.3472761.551077442.6C94612B@webmail.messagingengine.com> X-Sasl-Enc: uQBxmx5XzWnnKywA7cGK2fjkYmfDFpoJV6aZbxAV6Sx1 1458146989 To: Phil Sturgeon , internals@lists.php.net MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-872772a7 Date: Wed, 16 Mar 2016 11:49:49 -0500 In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties From: willfitch@php.net (Will Fitch) On Wed, Mar 16, 2016, at 11:36 AM, Phil Sturgeon wrote: > Hello everyone, > > I have completed the draft for an RFC, to add Typed Properties. The > patch has been written by the one and only Joe Watkins. > > https://wiki.php.net/rfc/typed-properties > > I would really appreciate constructive feedback on this RFC, with a > few areas especially: > > 1. How scared are we that integers can be expanded to floats on runtime? First, this looks awesome, Phil! After reading through it, I think we can consult with function return types: function blah() : int { return 55.5; } var_dump(blah()); Will return 55. It's a little different with properties, but what are your thoughts on this runtime conversion? > > 2. This whole temporary nullability situation, where unset properties > will error on attempted usage if not set. Should they instead error > after the constructor has been called if they are still not holding a > value? > > 3. Weak vs Strict. Right now this is entirely strict, with no > declare() to change mode. Reasons for this vary, from various sources, > but include "Not sure how to implement it" and "Well people should not > be using properties as part of their public API". > > Help on 3 would be appreciated. > > Also let's please avoid "PHP IS TURNING INTO JAVA" and the other > rather common rhetoric. Strict Type Hinting might have been seen as a > battleground for fans of strict and fans of weak to fight through a > keyboard, but this RFC will not be the repeat. > > We'll have a nice, orderly, constructive conversation about this RFC, > and improve the patch as you all provide feedback. > > Let me know what you think folks! > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php