Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112713 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 95192 invoked from network); 2 Jan 2021 19:20:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Jan 2021 19:20:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 90C26180384 for ; Sat, 2 Jan 2021 10:56:11 -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, 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-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 ; Sat, 2 Jan 2021 10:56:11 -0800 (PST) Received: by mail-wr1-f50.google.com with SMTP id t16so26935798wra.3 for ; Sat, 02 Jan 2021 10:56:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=YMn9yf8MFdKajRBhjB6k09bDB1oHvSqK9nXhbe3PlFI=; b=AH1OQ59GkxeEUpSkIXWX1skdBPGnrLxPib1gVAKvxa+RUxUI28PFnckIy4R30GS6MA 2esn1UDmUGFooa/UtZS1DEPocyUy3Fp9xkG75rtKSKrGw2y4qOqBEm4N+Lf9d8HCPjLV zG9HDPwPXdJC4FqnAjH1g975sg7fX0e57J60/uEjgZV6fZtZXyfYjamO2kxrnIf0KC8z Rc6vjT8mqkY6OHdniZuL6126+2Y3QHaIiZlAs7N1mo98VvEQvK6m0YJKw75bw8n2bVIU lWMcrClxO8b+j6KxC+jDRZVzddE2w7IEHU/Mqbzz5yu3ALxM22G8Ibw84wyTutkc/+ki T3zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=YMn9yf8MFdKajRBhjB6k09bDB1oHvSqK9nXhbe3PlFI=; b=WGmMsTEM0Pao0l/sgR6AmAjI4p2dtzLC+DNDCvIh5DyLvfAWQj6/idrkashQOqQ25b OT3N6IyhzDuTBko/nMc5J6rbGXHBQwqL8tElWJCrhjACtCTwDqpbNRx85KMmVIL4oXd0 XXl1GItQ0ADuCwKAZAqFC1RgEt3su0egoOQTM8Ar2Qcmk26jUcCoGwVjG+L6wTdak83i 1fBup7WOYs39gFryre1HT9sihrlQop6D4jug4YyCadQ8FUt2R8vA3Wld9lubWxzrf1vB 3z3EwfFiuMS7AVLIpu5nYEPmZ2bh0A6urCoRmhKnBvzmDWlqFuHtOGwoQwScsuKGPtbu yWpQ== X-Gm-Message-State: AOAM532kKHfRDHil9zqotjrtcZ9TarZNSxKnl6htDYhMLH8yGSZoGxx+ le6C2hThY2nAdbmIJg4cbANDCT4Ko2MxWQ== X-Google-Smtp-Source: ABdhPJyvFjg9XKur13JpKnt+gY16eHNNnTyy2r0f6FA+yswewC6x9reZsG9OyJtTD/F60FljVwubiQ== X-Received: by 2002:a5d:4bc5:: with SMTP id l5mr73463462wrt.15.1609613769902; Sat, 02 Jan 2021 10:56:09 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id f14sm68378779wre.69.2021.01.02.10.56.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Jan 2021 10:56:09 -0800 (PST) To: internals@lists.php.net References: <1d0abb04-4987-43a9-85bc-bccc3bd6be9a@www.fastmail.com> <03108284-740a-4a5d-130f-15b2e67e9df9@mabe.berlin> <459d7ff7-e553-dce9-7d43-c3b1e772e572@gmail.com> <7f4fe9ca-1c20-6f69-cef0-a9718af742a3@gmail.com> <30906866-1971-8395-05a0-fd78d054bb89@gmail.com> <0C621FEF-B76F-41F5-A5A8-E6F24D69DD3D@pmjones.io> Message-ID: Date: Sat, 2 Jan 2021 18:56:09 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <0C621FEF-B76F-41F5-A5A8-E6F24D69DD3D@pmjones.io> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] Analysis of property visibility, immutability, and cloning proposals From: rowan.collins@gmail.com (Rowan Tommins) On 01/01/2021 20:31, Paul M. Jones wrote: > The complaints against the incomplete and inconsistent immutability of PSR-7 have merit. The big mistake of PSR-7, in my view, is mixing immutable objects with streams, which are inherently mutable/stateful. I wonder if there are any lessons to be learned there in terms of what kinds of immutability the language should encourage / make easy. For instance, is it better to constrain entire objects to be immutable rather than individual properties? And should there be restrictions on what you can declare as immutable, since "immutable resource" is largely nonsensical? Or is it rather a reflection that building purely immutable implementations is hard, and the language needs other facilities (monads? ownership?) to mix in those parts that don't fit? Regards, -- Rowan Tommins [IMSoP]