Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102918 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60069 invoked from network); 19 Jul 2018 15:02:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2018 15:02:10 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.43 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.214.43 mail-it0-f43.google.com Received: from [209.85.214.43] ([209.85.214.43:55779] helo=mail-it0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/FB-37178-FE7A05B5 for ; Thu, 19 Jul 2018 11:02:09 -0400 Received: by mail-it0-f43.google.com with SMTP id 16-v6so10222964itl.5 for ; Thu, 19 Jul 2018 08:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YhbEOOTajilM1PJTdq8gwASu0v4UAZFuvaL2HCGEprY=; b=daORCD8u3GlaEBt+riZ3EPzv99m9NYxzorD39kzMz5k5wIl+YtkSXisXtZChKOGwVS RE1nmjbl8Ph4dFjJqgjY6CE4q+cQfDQAnFbinq4ZPTaqt9ld6eixCBZI0cwkZpuxPIFz WgeWiPoe5DNaIKQ52BkPOQvtHBfyBggFCE3oOouU8vxehY/zBEJLbVSEU8Po/FQqzvrN Dl0pZhTaPATa0jv8AeJSC2QmoV2KGi0goWPT7EzVVEb/UTNjVvutcQIodZtWdGRsdbUh yJzf8aJymNEep+8lD+Udn2f62zxCgjQTpd1P/hNh83TaggnJj8j2lcsQQszR4JBwaStn Xn/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YhbEOOTajilM1PJTdq8gwASu0v4UAZFuvaL2HCGEprY=; b=UgKFvPX+DlhSsF19v192tTqLNNrxNmO1UM0yDSfGkpDIwfENF0FkMxZFbxfJAsUaxj f8zMzb2kyovGFpB/3paMi7yX//GxcIwVjMdGDzLEaQiF1B/IKz8ReOH1Pw4DqRLHiNcc BA4+tTFZpol6xGh4K8KY3iJZiQUURE9Erpdedy+YXVuFBE66p0Cl/vn+8rSJBBcuqOH2 IgL4jPHqEmLHJ7wJZ7hGdqf/u9U4w/Vheh5iuOzp+2YLzGRRp4TcTZT5o45hAPr+K24z K77HwvlDeVmi9SEJf8eyR0VpHsnqU7f4GXSgemsYwhRvVLCjdRiu3zlOvX8xgvMimF58 pL/g== X-Gm-Message-State: AOUpUlGCvlu90jas2C2oNwcQAbIzSVRxAembL6vuGDyhRg5FJywWeAMI /DfmGPs8eJLR2EwdCBFzhBzDsO5UEoNBI/+YzwQn1g== X-Google-Smtp-Source: AAOMgpeRiR3zqWEEDw63IEDA/PnczabZZiOA1zPFxPTDA1Oy++/P0kzRqsM0j21BuzTsu9WMisvhZ/GZPS6UsAc2btw= X-Received: by 2002:a02:4d57:: with SMTP id l84-v6mr9999221jab.56.1532012522074; Thu, 19 Jul 2018 08:02:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:95a8:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 08:01:58 -0700 (PDT) In-Reply-To: References: <8916EC21-D368-40F8-9ABD-CE0C04A73539@gmail.com> <1832302.prXWr4o048@vulcan> Date: Thu, 19 Jul 2018 16:01:58 +0100 Message-ID: To: "Christoph M. Becker" Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000002b7bba05715b7699" Subject: Re: [PHP-DEV] Non-nullable properties From: rowan.collins@gmail.com (Rowan Collins) --0000000000002b7bba05715b7699 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 19 July 2018 at 15:20, Christoph M. Becker wrote: > It seems to me that either of these proposals would render the lazy > initialization pattern outlined in the =E2=80=9COverloaded Properties=E2= =80=9D > section[1] invalid. > > [1] > Hm, I guess I didn't read that section carefully enough. It strikes me that that entire code pattern is a hack due to lack of property accessors, and it seems a shame to reduce the usefulness of the language's type system just to support it. From the responses on this thread, I get the feeling I'm in the minority, but it still feels utterly wrong to me that a property marked as non-nullable offers no guarantee at all that it will actually hold a valid value. Regards, --=20 Rowan Collins [IMSoP] --0000000000002b7bba05715b7699--