Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108707 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90405 invoked from network); 21 Feb 2020 01:34:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Feb 2020 01:34:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0E10118050B for ; Thu, 20 Feb 2020 15:50:16 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (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 ; Thu, 20 Feb 2020 15:50:15 -0800 (PST) Received: by mail-yb1-f176.google.com with SMTP id k69so289925ybk.4 for ; Thu, 20 Feb 2020 15:50:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fBogYSthZFigx3ZeLgijHGZsPvpvnPcDSIBPaTrNPTA=; b=luKZkoOw011lrCp1hsZs4V8hoG2ycKTaeM1g1C6u1ZQVd/8DaHIvkfJUP0oeSTemvz 7ayTB49I6+EiLWWSN0HMJWduWXnQMNLavgfMBVEzw8VEvKA/jzuvbJJ3bmqSCC2HFIv3 V8ZGkTKmhsw9tVlSOgALauWcW9dkt3L+sZO4CwaO7r2XEtB4VXjlvy1eUcCcx4BQZusg CQCwxqSVKCGWKrUGWPLeUkK0zu1Kj2NTp7XpmmRKDfY2ZANnllzy5OYFz5ENI4T3mN+h Id53vjmhk0lDuUc523buYLulifK4tCdjatk39opt7ZgBlKRHofNnDRW4fbZ7AK3ac0u4 AIRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fBogYSthZFigx3ZeLgijHGZsPvpvnPcDSIBPaTrNPTA=; b=qorlBgqJDBn2rT4+lClUUitYrpYYCaK6CygGJUARRM2Ghp1Bjn+pJZxt+PID4Grmg6 dtF2Spe7YWZXo5HBGyY5ygnUGDHKetGqgpVb29SSBmbpGes3t3m91qpbCaOFQJt6x/jd Bcle9vXtyb2500osR2x93YVIs3h1qClxfJOKQRuCFuP9Z+T/toLD6aT3nEBvQqVMDSMv cB/Kux5/WKa/5ZFnreNEEbu7yeChkzAtL7KfGTjzLjdgq+8U+3Yppe6aA1TTGGgGJIvY HeH0rLYO+3T/l1GiOsj/Gr29yUJECa/i+CHJvK5d84pMcwunltHRCxOFK+ohfko4ueYh 2wZg== X-Gm-Message-State: APjAAAVkM1rjvlkT97s52spMtEzGLDLwm8GySQ9TzaKah/tp8fV/KkD0 VX1VKB4F3t2VneitClzluKGBF6+stefdRA== X-Google-Smtp-Source: APXvYqy5tdbr0fEfxaPnudYgaq/H1YEKcyJTMCTCxOSqxaWybIXfgwBwjQObkrjKg4l27kHet0OuLA== X-Received: by 2002:a5b:1c3:: with SMTP id f3mr31436929ybp.183.1582242611886; Thu, 20 Feb 2020 15:50:11 -0800 (PST) Received: from ?IPv6:2601:c0:c680:5cc0:cc:8e3a:41ab:eff? ([2601:c0:c680:5cc0:cc:8e3a:41ab:eff]) by smtp.gmail.com with ESMTPSA id m138sm567971ywd.56.2020.02.20.15.50.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Feb 2020 15:50:10 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: Date: Thu, 20 Feb 2020 18:50:09 -0500 Cc: Christian Schneider , Nikita Popov , Larry Garfield Content-Transfer-Encoding: quoted-printable Message-ID: <279B9509-E661-4419-BC62-58D72118AD3D@newclarity.net> References: To: PHP internals X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [RFC] Explicit call-site pass-by-reference (again) From: mike@newclarity.net (Mike Schinkel) > On Feb 20, 2020, at 9:13 AM, Nikita Popov = wrote: >=20 > I'd like to start the discussion on the "explicit call-site > pass-by-reference" RFC again: > https://wiki.php.net/rfc/explicit_send_by_ref > On Feb 20, 2020, at 6:04 PM, Larry Garfield = wrote: >=20 > If $this->data is itself an object, then you have a concern for data = manipulation (spooky action at a distance) even if it's passed by value. = Given how much data these days is objects, and thus the problem exists = regardless of whether it's by value or by reference passing, adding = steps to make pass-by-reference harder doesn't seem to help much. >=20 > --Larry Garfield > On Feb 20, 2020, at 6:26 PM, Christian Schneider = wrote: >=20 > +1 >=20 > The whole discussion about being worried about 'malicious' libraries = altering your precious scalar values misses the fact that PHP is not a = pure language, there are many ways a function can have side-effects, = Larry pointing out one obvious one. > Speaking of language editions: Trying to solve one obscure case (and = one which is easily enough detectable by statical analysis) by = introducing such a big BC break could render a whole edition ineligible = for a software project. So beware, features bundled in one = (hypothetical) edition better not break too many different things at the = same time. >=20 > If you don't trust your library code then you're in deep trouble = anyway. A huge +1 to Nikita's RFC. A noted -1 to both Larry and Christian's objection. Why? Because = perfect should not be the enemy of the significant improvement for = specific use-cases unless it can be illustrated that making the = improvement disallows future perfection. -Mike