Morning Dmitry, There's no section for nullables, but there is mention of them, specifically in relation to your query:
> While parameters allow null to be accepted as the default value, null is only a valid value for nullable properties. Is there something wrong with that rule ? Having explicit nullability means the declaration tells you all you need to know, all the time. Being able to set null any typed property means you can never be sure of the type; You can't tell by looking at the declaration what type the variable will be because anything is allowed to set it null. We waited for explicit nullability to avoid this. You'll have to have a really good reason for me to change that rule :) > Inheritance rules for typed nullable properties are also missed. That's true, but shouldn't they use the same rules as nullable parameters, will discussion change how they should work ? > but still have unsolved problems. If you have discussed these somewhere, can you send/show the transcript ? (I missed all comms after yesterday morning, due to illness). If it emerges that the RFC needs to be modified heavily, then I'm happy to stop the voting. But, so far, we haven't actually deviated from the RFC, only changed implementation details that are not part of the design of the feature. Sorry if it seems like I'm missing information, I don't know what you and Bob found out yet ... I super appreciate you guys working on it, obviously. Thanks for that :) Cheers Joe On Tue, May 24, 2016 at 8:04 PM, Dmitry Stogov <dmi...@zend.com> wrote: > Hi Joe, > > I've add implementation for nullable typed properties (as they fit into > the patch design), but RFC missed any description of nullable properties. > See tests Zend/tests/type_declarations/typed_properties_047.phpt, > Zend/tests/type_declarations/typed_properties_048.phpt, > Zend/tests/type_declarations/typed_properties_049.phpt > > I'm not sure, if this is what the voters expect. At least I don't like the > facts that "?int $foo;" declares uninitialized property; "?int $foo = NULL" > may be unset() and became uninitialized; and it's an open question if "int > $foo = NULL;" should be supported as nullable. Inheritance rules for typed > nullable properties are also missed. > > Personally, I think the RFC was moved into voting state too early (without > good enough implementation, and with missing topics). > The current implementation is better (performance penalty reduced to ~2%), > but still have unsolved problems. > > May be it's better to cancel voting, solve problems, finish the > implementation and add missing questions into RFC... > I'm going to help with implementation in any case, but we should agree on > what we are doing. > > Thanks. Dmitry. > > ________________________________________ > From: Joe Watkins <pthre...@pthreads.org> > Sent: Friday, May 20, 2016 9:05:34 AM > To: PHP internals; Phil Sturgeon > Subject: [PHP-DEV] [RFC][Vote] Typed Properties > > Morning internals, > > Since we have our answer on nullable types, typed properties can now go > to vote. > > https://wiki.php.net/rfc/typed-properties#vote > > Note that, support for nullability as RFC'd will be merged when the > implementation for nullable_types is merged into master. > > Please participate. > > Cheers > Joe >