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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to