Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93494 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44244 invoked from network); 25 May 2016 06:06:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2016 06:06:04 -0000 Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.161.171 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.161.171 mail-yw0-f171.google.com Received: from [209.85.161.171] ([209.85.161.171:34676] helo=mail-yw0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/82-17017-BC045475 for ; Wed, 25 May 2016 02:06:04 -0400 Received: by mail-yw0-f171.google.com with SMTP id c127so38092875ywb.1 for ; Tue, 24 May 2016 23:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=iPBL/bYvPcxZUVlqCYcT7d53XEMBtKQddxvUr3UlM+U=; b=dr540Qe+bljF9N72qZZ3rbnbE67u91m0sxJ0ICOIusWAmxwJWC/t5CzwS9P+rBKnn9 FSAphHk89ycMXM2F1aqVqd6mKaKjoH/45dgnwj3seoa7Yoyq6tPZxwgpt/qjnZBEQoBM 3/T2aRAI7mIbpKWGuOJp4VTsTyiBaEalXtdDk8ynjsc3BsU1jraeByFWnPJF7/IRq62C 98AQDEm5VjGPNgmYIETNEog5Bz3KmM2NETreJ6qWJTZ21tHU3ToCt2Ecn71qKhH8AjDm W4JOlYjyn+t+Gn7N2Ik+73YVUDsLfPDO4mF7nQOvdojKQliny1viTNsKNxvXlLe9JXG9 HG9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=iPBL/bYvPcxZUVlqCYcT7d53XEMBtKQddxvUr3UlM+U=; b=isIFan05QTLidVpraLPhT5Nn3qaiQrpdes2Vuru4r+HlTpDorIiCdyODysy+m68Lk7 uYl/FC6vYEQ0UeaDKtfn274qOPJkxmNSjyxCMzWvpWEH1RI7mDNHcLdcwL3cbm7xYc1t VgoxP7sqx6aL/xyhC2eQIczsZb5ZciCBpW7BxiLgLm4TujSOpxumNqsbDmRzxpDe+1DW DPu+dVEixy2UwoqtnPpLWvJfjEbJiX9c+8udH5SXg+aSB+kazTHpnAXn+KPFDTYYwzXE n98JRhBpEmtonxEzR56WUGCRUvYkWv7B1sQuw6L7lKpptKDDIou72ZHog9WYh4ZLd531 EyRA== X-Gm-Message-State: ALyK8tJWTSukT9lfVdgcqgELAWIVKdQ/MvRUkn6Y2/sN72KnNrlKR8Bj6PahnNDc3Iap81WhUgmSNKslUSeJrw== MIME-Version: 1.0 X-Received: by 10.129.166.214 with SMTP id d205mr1168313ywh.323.1464156360634; Tue, 24 May 2016 23:06:00 -0700 (PDT) Received: by 10.129.109.67 with HTTP; Tue, 24 May 2016 23:06:00 -0700 (PDT) X-Originating-IP: [109.157.60.67] In-Reply-To: References: Date: Wed, 25 May 2016 07:06:00 +0100 Message-ID: To: Dmitry Stogov Cc: PHP internals , Phil Sturgeon , Bob Weinand Content-Type: multipart/alternative; boundary=94eb2c128e54c5a9020533a47774 Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: pthreads@pthreads.org (Joe Watkins) --94eb2c128e54c5a9020533a47774 Content-Type: text/plain; charset=UTF-8 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 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 > 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 > --94eb2c128e54c5a9020533a47774--