On Sun, 15 Mar 2020 at 21:41, Jakob Givoni <ja...@givoni.dk> 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]

Reply via email to