Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109056 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26089 invoked from network); 16 Mar 2020 13:30:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Mar 2020 13:30:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C7E5C1804C5 for ; Mon, 16 Mar 2020 04:52:43 -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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,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-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (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:52:43 -0700 (PDT) Received: by mail-vs1-f45.google.com with SMTP id i25so11031802vsq.9 for ; Mon, 16 Mar 2020 04:52:43 -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=aT2W/mrAYiF/3kyhgQO1ObAFJ5+uHv5ZPJqYLivjPsQ=; b=LVL+P8XqZ+7h6PAbWqWvITzrj70HQuTCoCMepiq0YMqYRH+kTSNDcMgw6nE6NcQII7 s0Pf9V2QqMdk58z6/wQ2rHZN71vDgFLsWqb5O//2YJGqj3fZxFJnLDQikCRa0OJNeXAw OnXyUlw21/INRQDuQgmynPysaVBZItE6l/HDSFLFALi1TfTbQmmZYMNnOAy5tvZ4fKf7 rcMZT4GcJnRFgSUdjRNRRduFWyTth0V/7LC2Ag0HNupHzUOrdJvymshnX946EYYiQx0U Jlygih/CnBgiSInHFmfuD1OPJVCziomOSfZ0pZEigoMVwTpux2XKBPeVTNMWOj4IYb8H /Llw== 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=aT2W/mrAYiF/3kyhgQO1ObAFJ5+uHv5ZPJqYLivjPsQ=; b=fVxyF7DD9b4A0PSHDMopSTVxng5edJX5RQZHpVdOHPLHLY+IdabcD5frCwmh92D5Y3 lcx+IWYSyhhtIjZS8iatdcE2T8LvyTTaWVaPyH7dzDV6frzTTJigRhTl0HsmVF5d4KZX SlVP0wmTQrw/1DF025JOnhqvv2bxm06W3BOdsca605657+w8d+d+WQPxyTDoGYKSq66z nTnTg2kFagfvqwJGTmm18PmzgiIHE0M/PDKwk3uqnxFom1wKag/mIgDUgqFVtq0Dpbo1 InzEX3VhPauGg8DE9k2PmbKN2Mc4/X6NK7XcXfz8+X8aQLunkpa+6SeEWYZUvHdkpc8S 84UA== X-Gm-Message-State: ANhLgQ2hLn+ZaxaQF3abW2iVdOnyDnImu3nOaNubcjnqdZlrLo32COTs iP1xcvPBxcp7f/40ONSfk4bUUEMXdoW30hQArnk= X-Google-Smtp-Source: ADFU+vspCagMx5QyXdxflVywSqd4qVxrYLxbPbJS/EWIeJcIDgO1JkoIc5VvauOantt3dsWbz5LeQpMpDBTP2LtfHCw= X-Received: by 2002:a67:20c1:: with SMTP id g184mr13591504vsg.178.1584359561779; Mon, 16 Mar 2020 04:52:41 -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:52:30 +0100 Message-ID: To: Nikita Popov Cc: Larry Garfield , php internals Content-Type: multipart/alternative; boundary="000000000000e05e6805a0f77464" Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Immutable/final/readonly properties From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000e05e6805a0f77464 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > 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), and > then assigning the specified properties, this would not be compatible wit= h > readonly properties that have defaults. Other implementation approaches a= re > possible though, but may not be easily reconcilable with the need to also > call the constructor. > I think what I'd expect from a possible object initializer feature is that 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. Thanks: M=C3=A1t=C3=A9 --000000000000e05e6805a0f77464--