Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102861 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17824 invoked from network); 16 Jul 2018 16:53:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2018 16:53:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; 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:35851] helo=mail-it0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/AF-39793-C8DCC4B5 for ; Mon, 16 Jul 2018 12:53:32 -0400 Received: by mail-it0-f43.google.com with SMTP id j185-v6so22391400ite.1 for ; Mon, 16 Jul 2018 09:53:32 -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=zDGcJgGLQQpMuu9gKtJcElx3//GUauecFoZx/PUaz7I=; b=nybnAykaSotekHDs7Hf3CCWkKEHx1w9A9m596CScPtZcFQsA/FWFXWqNC2xaI2gkAQ 0Iy6OWWWekiJBgrNB0htKIWdh7zC/dodJhB3Ot5yJWmONHzm19GjoSkjlrLHd38lKaO/ zcahpeB0ch2n9MLhiwdZcTAfVvTjuitjhHn/M/NZ11Nq4aZiNVOtU9+bDdJ+JEfs3uhH 5TWBNFlTgA+aHuUpmQsmPDRpmtj9v/Q3bhJqBuAUJc/MdDPgVXYPGIlpS0jqPHJdPGtV Q+BusO4fJizZFhagrFs2VuX9fd0of5chkR6pupEz2/RCq03PdTmgpOgXmCn6ClfpGSCu ZzKw== 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=zDGcJgGLQQpMuu9gKtJcElx3//GUauecFoZx/PUaz7I=; b=nYZsY3+Gn1XaM6Gm9MShwJ3tCZp+tlXukX44SAFBQP8bHciFUn73IQZkuevNXBt3sS Mjm9G7zBjKl4U3AW/R8RItKu3si88G0yVcdCjq3VE05+25WzD3pns/B1Oz7bPSLcyZY3 OuZ6DKR9/4ZIvMVG38m8aCvussxc5dUD+piiX0gK/QNgauOQEERAm4oDh2pKzQO+QmD5 Gd7SaFjWYCiolhuDCR+njdyPRhl2kZIrivO13dH+LSawUC7PkYFEtwDX/5fPMQBPYvnj npjq5UwzRjcaPDiRpF/UXTCa/Q1bGd7MudKzQNyJAm0Vfd6QbgHaUT0J38X7Cs0jROxm U7zA== X-Gm-Message-State: AOUpUlEsRiDgbk3AqeDWXiFgHEKL8T38vdOCr4RB403jFgxj0Ts32KtS 3Bmp2EpKokfj2CPKCnOKTKsMsAqTWMI/rRlf02E= X-Google-Smtp-Source: AAOMgpdAg7Na9KGaewRDV4avE8b0C+b83C/q3VcA7gP9fdlfkf1ILXA82svgesNIfxfrS/efdez857f1qCR9l0ZGIi0= X-Received: by 2002:a24:4048:: with SMTP id n69-v6mr13402362ita.60.1531760010318; Mon, 16 Jul 2018 09:53:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:95a8:0:0:0:0:0 with HTTP; Mon, 16 Jul 2018 09:53:29 -0700 (PDT) In-Reply-To: References: <8916EC21-D368-40F8-9ABD-CE0C04A73539@gmail.com> Date: Mon, 16 Jul 2018 17:53:29 +0100 Message-ID: To: Wes Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000004be31c057120ab58" Subject: Re: [PHP-DEV] Non-nullable properties From: rowan.collins@gmail.com (Rowan Collins) --0000000000004be31c057120ab58 Content-Type: text/plain; charset="UTF-8" On 16 July 2018 at 17:24, Wes wrote: > It's more strict in the proposed rfc. In particular in java the error is > allowed to propagate in the program, while here it won't be. > In other words if ` $foo->aaa` is uninitialized, you are not allowed to > do ` $baz->bbb = $foo->aaa`. > In java that's allowed, so in java null pointer deref can really happen > anywhere without knowing its origin, and that's really a big problem. > >> > Ah, yes, point taken. I'd overlooked the possibility of copying the reference without dereferencing it. That is indeed worse. Although the ability to pass around, duplicate, and manipulate an object in various ways and then suddenly get an error that should have been thrown in the constructor, is still pretty unhelpful. Regards, -- Rowan Collins [IMSoP] --0000000000004be31c057120ab58--