Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110086 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88951 invoked from network); 8 May 2020 14:56:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 May 2020 14:56:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2ACE81804C3 for ; Fri, 8 May 2020 06:32:05 -0700 (PDT) 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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.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 ; Fri, 8 May 2020 06:32:04 -0700 (PDT) Received: by mail-il1-f176.google.com with SMTP id s10so1376294iln.11 for ; Fri, 08 May 2020 06:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MG2FYZ0OLe666wKOo/eO0Cl2lp9SbOfp1AuXh3KCtfo=; b=Uy8hdxvoNrQVNSWUtyVsMRoCdtyqlG6ArNanVhftke1TVS3Hr2waXF79S02zKMYVhc LFjz8BSAm8a7VOcYyp37VWwz75P2X24afn1hGOBQtBdmD6t4zG2VwYghJwyCrl27dUJd 0ZLWS6rYQU4eqx4rkgxJt2UV55f02xpJ9vJw8= 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=MG2FYZ0OLe666wKOo/eO0Cl2lp9SbOfp1AuXh3KCtfo=; b=oC0hxrv/ogKkqnT+CTQL4ccJakuxfJgkP5+OOcBAILewqKuTImPgBTtxaaf3+Xi4LL WvUy5uFxKcWCSy76sETIH4SvuV+oKEdi5dRTA/B8NUaBhX4S9Ndz+xIxOCOJUmlOL3Bm GZwtbNwSPd+1fhJdPFSyZXdbmRAmPzID+zWAiTuIQiEahbTxCfFvbQ2NIndc3qvb/7N5 aiWdCtK6Ve5FE4uYUjXMShvNc7SN2Twlcigjy0637LrW6E2hdqPRRwhV/RdOrJjMkyqD tXpEB/CO9XZcnPy9r12aGckslcOxrqio2/eiyodynJJhaR31foOAFi7mj5WbpUjUCg+4 bF5w== X-Gm-Message-State: AGi0PuaBhogVNsnMf8ALKeveSg9lD5SGg+xtkbE8iMHRP6BGK8ba2M7A pOA+H2NxGlIhbaG+ofCfh4mpjOjifZULKcfGMZv/jA== X-Google-Smtp-Source: APiQypJBNCarMU3+E6ZEHN9S7TJoO3P3gP1BP4dzW4IQpERp/fgb1XFgIs5utKDamIkHO9XCBDvjoFleASe+moQlDCA= X-Received: by 2002:a05:6e02:cd2:: with SMTP id c18mr2914212ilj.223.1588944723782; Fri, 08 May 2020 06:32:03 -0700 (PDT) MIME-Version: 1.0 References: <171dee3baf3.bef5753260554.3262181919550021853@manuelcanga.dev> <171e05b4ced.1041f31b5124598.4028595156690203917@manuelcanga.dev> <10faa29f-f08f-a73e-b76d-683f5abbee86@gmail.com> <171f30b0df0.102b810be444185.2462173785894899100@manuelcanga.dev> In-Reply-To: Reply-To: Levi Morrison Date: Fri, 8 May 2020 07:31:52 -0600 Message-ID: To: Dan Ackroyd Cc: Manuel Canga , Rowan Tommins , internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Keep type of reference params From: internals@lists.php.net ("Levi Morrison via internals") I think changing reference is a bad idea, even if it's behind some sort of declare or ini setting or what-have-you. I do support `inout`, which has similar high-level outcomes: the current value is fed in, and when the function returns it has a new value. I think we should use `&` at the call site, and we should also permit it optionally for by-ref parameters as it provides a migration path: first add `&` to all the call sites, then switch it to `inout`.