Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112169 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 35773 invoked from network); 3 Nov 2020 20:15:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Nov 2020 20:15:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3BF561804D8 for ; Tue, 3 Nov 2020 11:35:54 -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-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 11:35:53 -0800 (PST) Received: by mail-lj1-f179.google.com with SMTP id x6so20356138ljd.3 for ; Tue, 03 Nov 2020 11:35:53 -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=kHH/kC/omMU0UnKGhVJh2VoRsP2zEC79HLFHuxCiCjI=; b=DzzqyXVWqgB9emnNmbAmdaIxCrHcIhQYqoCfw7A2oFqMoTQ20IJnmtjRCPByVXyPS3 WO694oFc3Z4CfKqrwv4/FtNUINVrih/7gnP++SFTYmml+PM+BMAl/vdiGpseAyOSRvLU yrlID1Hy7zijISO0YXS51oaQFg9L04Mds8zyE5WNB126KY/X9aMKgzZxexo2uekBgTBk 07lxsB0S/+QxXKgipTwpaPH+NjK62oILyK0ggTtXiIdAl/nOyMLGlnEvd1Bj9Dnb8GNE BYmK7Eleah/tQBi+PEsuFtT7pjaE3Zla64f9xCJee04qFsq0wbJR7vm1saRd4V/RQXyp 3n8A== 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=kHH/kC/omMU0UnKGhVJh2VoRsP2zEC79HLFHuxCiCjI=; b=hzu+4sbcNcLUYb5ScvTSSSJ2Tvb+U84cKzkBkZcWv/dXCp9D034NTLQ7QitTNiajRn nhCsiV4X0F31tm3HUzselzspY+WJzZBJouPLRtO+4qzdWG0unsLriB6SR3xMQNZvdykE fKzfPzXTq1UOuasK4WEGfXnRZVBr2B2+TKKosfYa5eAigP9zel7Mu2LyLeV9HjNzmQYf Q+ozBxrGQHcpAMkDmmIAjDwPCkZ8QHBX8GltFZBR4lr9RWNUWPV7O1ZzQzJCFbW9HWde ODJNGAPqa63JltI95y/CLXFnaCpuv7yxH29xFQRz5v8JbpTNLFJ8DUDS4qCK84Gs8MDh 38rw== X-Gm-Message-State: AOAM532Y82G5JoM5JAIGKkgAh2dUZyesUACxciW0aC9tS0KaEgH4EKwO E3u/+RQa7nOx5pGFfi/GKcoz8NPAbzYCZmbtRVo= X-Google-Smtp-Source: ABdhPJwkdpf3P3FjoC7X93sQxShQbiq3ow0UCT5HGxw5RHcmUgTITCPQdVavAKF3/VeUlgPkJ5nHaNQ70e0vHIolHK4= X-Received: by 2002:a2e:9dd0:: with SMTP id x16mr9616959ljj.237.1604432152207; Tue, 03 Nov 2020 11:35:52 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 3 Nov 2020 21:35:40 +0200 Message-ID: To: "G. P. B." Cc: Benjamin Morel , PHP Internals Content-Type: multipart/alternative; boundary="0000000000007fa41c05b338f8a3" Subject: Re: [PHP-DEV] Nullsafe From: zsidelnik@gmail.com (Eugene Sidelnyk) --0000000000007fa41c05b338f8a3 Content-Type: text/plain; charset="UTF-8" About implemented, there were many implemented features, but not accepted. I was very frustrated, when I knew that PHP could have https://wiki.php.net/rfc/userspace_operator_overloading , and it was already implemented. But some people vote down, because they are "narrow-minded" and "have bad preconceptions" and would like to find more things they like about the feature. On Tue, Nov 3, 2020 at 8:33 PM G. P. B. wrote: > 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 > --0000000000007fa41c05b338f8a3--