Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112183 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65341 invoked from network); 4 Nov 2020 20:18:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Nov 2020 20:18:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C70731804B5 for ; Wed, 4 Nov 2020 11:39:01 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 4 Nov 2020 11:39:01 -0800 (PST) Received: by mail-lf1-f48.google.com with SMTP id 126so28697558lfi.8 for ; Wed, 04 Nov 2020 11:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vrhfWbkHVcIuMHjuZpdOXYlENmuNcgff+SDj9bkilF4=; b=KrG+n5toAaCav2IaMNnxsmH9F2MYydU/Vb+gNDY6DxEookPwa7+O1c+zEgh1yUdGXZ uTo7rS4vqrq08taeafSzlLglSs7e7SMFNo5qWnwZlw7S63mQi7KWsae3i843+5YJb+Bw vnY5QJ8AUkCZTas6UvKgo+ITKHdhlVPV3YYj1YhIwXI+cDF4PMch9kzacF4NqFsGHCWp WWOfZDmFxTYMDArdfnLJsj7ahVlLphTJ03vqhuz3JBWhM0zNcl+BlrUEvL8u16QNQaVP /ppcrsQJx/34r77qMgaDY+yeQ/dqfGHrUjFUlju8gMOru2L2DQNWrAkAblS2yNP4CZYQ QWYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vrhfWbkHVcIuMHjuZpdOXYlENmuNcgff+SDj9bkilF4=; b=ciI1s3kXWXox+hKWhGPFhcrUYvXIcpMuJJ4tc2ndk9EhHRaAWaEWzwP+mqAJdyhgAj f7ToPE7Ye7DQIk1Cf47CHMwXOVs4wmd/ATxw+im1Jnb8lUud3ikt6LNlIPpSV+C4V757 PIjvND1IBYOIt2H4R5n0Lhlyj8eWNQFPVe5CiTWxhq8citm0jwX6n2cMvRGZuN8htbLP llgkhdUTfrmw1RptCOM5ABqnzT50GK59gQXT6Bk5iYngBDVG0lFLxqLSocsQVWvXTh+V 5cBcBCMjg8tWXN30R6eFAw/qVgOnEv38RlOVs/gNTVNuYvuUYaGDihv9GVEzzOAGmSiC zjYg== X-Gm-Message-State: AOAM531iwmsmWkCaH5RgXyfCX46FrgzzPxziYUR+wVKYLAc4x0WFACPK gCniNbKXuQJJqqtQY1gRxzSeKlz/vZQdP++DhFHyKWH0 X-Google-Smtp-Source: ABdhPJw5CiusXYy5Rn0fl9/lp6VEyV4X04G8GgR0joU6uVb7dVUGzFlRg013uMXlD6Jv/b1yCGWmp6qOY7pcL8X0puQ= X-Received: by 2002:a19:c70f:: with SMTP id x15mr9499248lff.296.1604518737955; Wed, 04 Nov 2020 11:38:57 -0800 (PST) MIME-Version: 1.0 References: <3BFB4833-2419-420B-9A34-F2DB36BF6FD3@cschneid.com> In-Reply-To: <3BFB4833-2419-420B-9A34-F2DB36BF6FD3@cschneid.com> Date: Wed, 4 Nov 2020 21:38:47 +0200 Message-ID: To: Christian Schneider Cc: PHP Internals List Content-Type: multipart/alternative; boundary="00000000000069504a05b34d2192" Subject: Re: [PHP-DEV] Nullsafe From: zsidelnik@gmail.com (Eugene Sidelnyk) --00000000000069504a05b34d2192 Content-Type: text/plain; charset="UTF-8" Yeah... Creating null was a huge mistake. Now it is probably too late to fix that (maybe some new language can introduce that). But what do you think about introducing special class `NullObject`? On Wed, Nov 4, 2020, 9:32 PM Christian Schneider wrote: > Am 04.11.2020 um 19:39 schrieb Eugene Sidelnyk : > > Thus, can you provide any other dangerous example? > > I think at this point you could have realised that it is > a) a BC break (code which has thrown an exception before now wouldn't) > b) not finding any love among the community here. Possibly for a reason? > > If you really want you could put an RFC together but I'm pretty sure that > it wouldn't be accepted. > > And now for your dangerous example: > try { > $foo = null; > $foo->bar(); > deletel_all_files_on_machine(); > } catch (Error $dummy) {} > > > Regards, > - Chris > > --00000000000069504a05b34d2192--