Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109051 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2147 invoked from network); 16 Mar 2020 11:25:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Mar 2020 11:25:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B58151804DF for ; Mon, 16 Mar 2020 02:47:31 -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,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-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (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 02:47:31 -0700 (PDT) Received: by mail-il1-f174.google.com with SMTP id l14so15796920ilj.8 for ; Mon, 16 Mar 2020 02:47:31 -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; bh=1GEYbsIEYiNPc8xbGvlTGieqeezSnshjMXWLV2qYqnM=; b=DhJZDQpjfumXbpl++gjFGxX566MyTelmny1VyPcPulzoLqcizB3VDSWFKoRQ4fx0pn hv/OL69poOY3kOOj5Adg6fmob01sUsfD9y1qPDn5EIXhLMBZnpbwhJE9qba9nYDfnh1A MNl8YC05DZkZkGObySplVK5TZP4lxf3jiqEtxbGsLi3ev3U2hJtF8SwlJ5bMDyQdS95m c606wqXz0W83bwc/dmn9qfHlRV5xlhB7xG4Ybnfy+iWVhmbdNJDDjyGynNtFMYny5+dW yyCcLUy4o+d8ZpthXlvlfDu8XeBEQl0zZi2IPnTYZFVp8Jg6VfleVoXjqTRSuSIImUDj ZVHQ== 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; bh=1GEYbsIEYiNPc8xbGvlTGieqeezSnshjMXWLV2qYqnM=; b=ZyfekmuqjXV/k7xwnLKV3DdGf3vPWgBdDz+32e2ULBnqoVjxfx7os0sTaaAeITT4Xl viC4SRJ4SOcER96/kaWUYExCBzzrr81oBkDcPN+WfpW+LoyHw1rTp5XaMgH+pCzcXBAN njzBCTT45DLWL7nsc3iZhw4ySqaVP5zd7DR6YyTv5Q1aKPewFxOq9cJptX3FfJ1F3z/K xunT4MtNUnhTLGeCXf85mT+BPyJKCyBj1zo14hp/+Qvmw90FgdGbsn0WAllkdH2ynCsl EdQVITDKe15SFGh9FwoQaS0yro+zOFRya+2UXV24SYTCDyW36pCRIUT0oA5N8lhEvYHd jMZg== X-Gm-Message-State: ANhLgQ0Fk07b8OXNArFgNxy2i+Zi44l/eRJST8lttP7cOnqVSRg7aLT2 9NQLtb1srwerQAxGIynJSZEXy3hpdttzdrIGZsXjRA== X-Google-Smtp-Source: ADFU+vsCOHg494EzndA0R5zNDWWHVVNeJ+mIUXdAdjhi2VUsluaU6YnaZx3osPJlzqZC7swdCBWOKQGHOwtlEZ1U2LU= X-Received: by 2002:a92:ba5d:: with SMTP id o90mr19311491ili.253.1584352048193; Mon, 16 Mar 2020 02:47:28 -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> In-Reply-To: Date: Mon, 16 Mar 2020 09:47:16 +0000 Message-ID: To: php internals Content-Type: multipart/alternative; boundary="00000000000008262705a0f5b587" Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Immutable/final/readonly properties From: rowan.collins@gmail.com (Rowan Tommins) --00000000000008262705a0f5b587 Content-Type: text/plain; charset="UTF-8" On Sun, 15 Mar 2020 at 21:41, Jakob Givoni wrote: > On Sun, Mar 15, 2020, at 8:48 AM, Marco Pivetta wrote: > > I think what will happen is that people will start requesting for > read-only > > properties with default values to be over-writable-once > > Exactly, I think that intuitively, developers will not see a default > value as an actual "write". > They will expect to be able to overwrite it once. > I'm sure different people will react differently, but my intuition is quite the opposite: I would probably call the inline assignment to the property an "initial value", not a "default value", and I would intuitively compare it to assigning it in the constructor. I would also understand the intent of "write once" to be "once initialized, can't be overwritten", so would personally have no expectation that I could initialize a variable in both the property definition and the constructor. Regards, -- Rowan Tommins [IMSoP] --00000000000008262705a0f5b587--