Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109057 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27913 invoked from network); 16 Mar 2020 13:35:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Mar 2020 13:35:32 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1B6851804F3 for ; Mon, 16 Mar 2020 04:57:57 -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,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-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (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 ; Mon, 16 Mar 2020 04:57:56 -0700 (PDT) Received: by mail-ot1-f41.google.com with SMTP id x26so471086otk.0 for ; Mon, 16 Mar 2020 04:57:56 -0700 (PDT) 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=BiDu/fShZcvQ0PkFy/PtuH+odvKXTJitKtiZOJq7zWY=; b=REDy8cePf28NZfEhEoi6nTeTIIW2KhhHZ/guODnCWpAk2pZEDyfEUu+Qq1c5IzjtWZ F+yK35YQCqcTyp+CN6CDybVMVx33KGoAEcS3NhlkiMUfTCsnceJ46xIVk6+B5YvGUqEr Rh0h6htyHP/AmfkLo+mzGIXCr1ze93jwnmdVK3z39AnX00f1KAxeGwt1jVPRKoO5NRBn oHGJ5cuBLHe1/VhIYnj0gNEDjMZKo+IwovOe86qL2AW5hQCX2+kCG6782nPtnryO937h saTJrN/sPSPcROb8ouRds6CWloTTKteLQ5XXEhig+WdkzkWdcPQJB+aXn9Z7iatljM2J aZSA== 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=BiDu/fShZcvQ0PkFy/PtuH+odvKXTJitKtiZOJq7zWY=; b=sBrby4vYB1O8HtTqisrVqbV/0AQvHG1uP040vNTJ9iJJsBgUtAIV2h1N/iUmto6oNp V56Aodb9LK/5Y7DKDYeIO4wvL+hd32+QiC5SLPFm846yPKPLFb2ArY8rU8Zo093vOmXV DW7M3w1bVhY1Fdph4MRiHO8dVwDH61dihXbYR4ZGjV4TJR8vVqJ6AAcQg+9nh/ccR318 AmgJvkiOhsnuEQ3bxeJhZouVG4iqtIXV6llHvTE5u47Vx1fdAmY5Q/V55E+PjapWOXq5 0WsfhjQe07ETnGziwPtFZNv2cS5x08y3GvnR3UbQao2ubbq85NvpxDjNARE96hRDSVi9 wjNg== X-Gm-Message-State: ANhLgQ3IGfhcvc4DGnesomcCC7551SXFziDTSS+v5pLyoNgl1M/0Jlq3 HSsFDAzIW+end2nwhRg8rjYwdmoQLvYvqe4AQSu+/Xll X-Google-Smtp-Source: ADFU+vtFIKXwnWrN+DPHop1iut1MixNlMwtf5aQUPOaQzLHZDihwvUkNhz/4cmAmaUvKqcI1Em+HbzyP8By+t3sEPyE= X-Received: by 2002:a9d:6ac6:: with SMTP id m6mr5277851otq.198.1584359873585; Mon, 16 Mar 2020 04:57:53 -0700 (PDT) MIME-Version: 1.0 References: <8545d15e-ddd5-42be-8405-09697a077234@www.fastmail.com> <4d9688fe-cc57-44af-903e-05f4cbb1bbcc@www.fastmail.com> <6bcbf0a5-92d8-4cfa-a00f-e0e967fc037e@www.fastmail.com> <700327df-45d5-47ca-8828-d7ad9c9bee2e@www.fastmail.com> <6f2e7718-5d78-4c57-8da9-f8dd44cc9e7b@www.fastmail.com> <421993bf-821c-4ebf-802a-be9814b30b90@www.fastmail.com> In-Reply-To: Date: Mon, 16 Mar 2020 12:57:40 +0100 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: Nikita Popov , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000076279905a0f787b2" Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Immutable/final/readonly properties From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --00000000000076279905a0f787b2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le lun. 16 mars 2020 =C3=A0 12:52, M=C3=A1t=C3=A9 Kocsis a =C3=A9crit : > > > > The other one is the recently declined > > https://wiki.php.net/rfc/object-initializer. As it basically works by > > first > > creating the object normally (including a possible constructor call), a= nd > > then assigning the specified properties, this would not be compatible > with > > readonly properties that have defaults. Other implementation approaches > are > > possible though, but may not be easily reconcilable with the need to al= so > > call the constructor. > > > > I think what I'd expect from a possible object initializer feature is tha= t > it > can't overwrite "write-once" properties with default values. (?) > > However, I'm ok to to remove support for default values because of the > possible > problems outlined (confusion for end users, uncertainty how it'd work > together with new > features etc.). It seems that the replies are more on this side, so let's > be a bit more > conservative than I originally wanted to be, so that we have more freedom > later. > > Actually, I have already updated the RFC with this. Also, I made some > clarifications > in connection with serialization and the usage of resources. > I repeat what I wrote before but all those problems would disappear if we were to bind the proposal to visibility: https://externals.io/message/108675#108753 We could even consider splitting "read" and "write" in two separate keywords, each bound to visibility, isn't it? Nicolas --00000000000076279905a0f787b2--