Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112161 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21156 invoked from network); 3 Nov 2020 19:13:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Nov 2020 19:13:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 08D3C18050A for ; Tue, 3 Nov 2020 10:33:35 -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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 ; Tue, 3 Nov 2020 10:33:34 -0800 (PST) Received: by mail-ej1-f52.google.com with SMTP id gn41so8350064ejc.4 for ; Tue, 03 Nov 2020 10:33:34 -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=gijej5e8Mm9yU2qxKFtnsXi5DeiNi/Na++rtC6YwAYM=; b=Qo7IqaECqs5IvnDu5fR3yBLKUgSf6Fqrc6Ifrpz52r773M6hzV4LcMi+b46/e6FVEF XlBXhUKtsXC5JrNpssR0F2uj5O5IcKNVNADYhNpj9gbs8IyxrdfDUeSdn7fq+I9lS16l GW7BgWVCAR1Pht1c2tOom3OZX69ED7C/+6+tKG3EOTYI8npdGNk46sxBfyVAvzSmB/Tw cWVIic1Bb1OS6wD1Y5Qv84zhezd0Si2YGqsbNhC2iOhEqOpCXmP4fd8Nb+imD2/nIHBN Znh2PM5ZgF7p4emBKBgLSyUgGAymgsTcCvO5NzZW5cLw7fdXUsx88t5SIhItR1YldOlF zGuw== 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=gijej5e8Mm9yU2qxKFtnsXi5DeiNi/Na++rtC6YwAYM=; b=nUmuK3nXL1Kt5sklRdQxsxMvSar1MG7LRSOOqboovldFCK+vIr5Etxyg5gfIKKW2OQ 0y+n6N+xLfLFK26u6qtIbXqoXsWfuVEPNQMF8mjccfWPszAvqLFqJbk+4RCsggKKSRfb XaAWaGYZK/d2JIagtTPyQCUMgzqhvxuyNfWbSfVvrUHp1tyn7PF/uAwM/YiLcew4PhuI pGEG6bz92t1vKANdizcz747LQ78mQW3fySA9CzdEIVtHypnjyiXazVFB1FJ1mIOTQ87o XJgVqYOpiGugGqmSXmslrd/6IToBHF3qgjBJsh6auIlT2lNHROotfGJIGxaj8KFdZbVU HTpA== X-Gm-Message-State: AOAM530IqkdfOWdjuNHBos34MWrJca95E3mmjznU5NtOZSbeJdtMZKD4 VRF6jdZMu+TQpiMnjMzKmu0QVKgGm2UlKLhtJGqgof3XIZEiJQ== X-Google-Smtp-Source: ABdhPJyRlaIdZUYIDcgQo0oPYNDh0cJkAbmClaARRbGECXWD74mQcLXIUFPPcaA2CtCcATtbNQpHarMmZKjHNXOb2ek= X-Received: by 2002:a17:906:3b91:: with SMTP id u17mr21071804ejf.504.1604428412379; Tue, 03 Nov 2020 10:33:32 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 3 Nov 2020 18:33:20 +0000 Message-ID: To: Benjamin Morel Cc: Eugene Sidelnyk , PHP Internals Content-Type: multipart/alternative; boundary="00000000000096668405b33819f3" Subject: Re: [PHP-DEV] Nullsafe From: george.banyard@gmail.com ("G. P. B.") --00000000000096668405b33819f3 Content-Type: text/plain; charset="UTF-8" On Tue, 3 Nov 2020 at 16:48, Benjamin Morel wrote: > On Tue, 3 Nov 2020 at 17:38, Eugene Sidelnyk wrote: > > > I am wondering why don't we use ordinary `->` operator with safe null > > handling? > Implicit nullable is terrible, moreover I don't see why users should return null values more often. They serve their purpose but most of the time you can use another sane/safe default of the given property type. Moreover, I don't see the issue with another operator as it conveys *clear* intent especially in PHP as everything is `null` by default (might warn but still). *Technically* this isn't a BC break, but it's an enormous change of semantics for something which is worse IMHO. Also the operator has already been voted on, accepted, and implemented. Regards, George P. Banyard --00000000000096668405b33819f3--