> On Apr 9, 2016, at 09:39 , Sebastian Bergmann <sebast...@php.net> wrote: > > Am 05.04.2016 um 11:13 schrieb Marco Pivetta: >> First of all: +1 to this: very useful for value objects! > > My thought exactly.
Big +1 on this feature for the exact same reasons. > >> do we want to use `final`, or `immutable` for these properties? > > I have the same sentiment you have, that "final" would be confusing > and "immutable" would be better. But it's also confusing to have > the same concept another language has under a different name. Hm. > > I think I tend towards "immutable". I tend to as well. However as noted on misc C# pages* about immutable, this can be slightly confusing also; If the variable is ArrayAccess you will still be able to call offsetSet on it. “readonly"** would be another option, even if some might assume class can always write to it. Since there is no perfect name, maybe let the name be open for vote as part of RFC? To avoid to much focus on the naming during discussions/specification? * http://stackoverflow.com/a/6849164 ** https://msdn.microsoft.com/en-us/library/acdd6hb7.aspx