How records would fit into Google's codebase
amalloy at google.com
Wed Apr 3 18:33:45 UTC 2019
Hah, you got me. I had written it correctly in a previous version, but a
reviewer thought that "records should be shallowly immutable by law" was
unclear / unnecessarily poetic, so I tried to rewrite it as "the language
should enforce shallow immutability". Little did I know I rewrote it to
recommend the exact opposite!
I agree immutable is a bit of a bummer, especially to say out loud. It's
too bad "persistent" already means something stronger, or we could try to
convince everyone to use that. "Changeless" is too prosaic. Oh well, I
guess we're stuck with it.
On Wed, Apr 3, 2019 at 11:22 AM John Rose <john.r.rose at oracle.com> wrote:
> This is very welcome work. Reading the tl;dr I was struck again how
> terrible the term “immutable” is, because the first syllable so often gets
> lost, in both speech and text.
> I suppose you must have meant “shallow mutability” as short for “shallow
> mutability status” but the bit gets flipped so very easily with that term.
> I’m grumbling about the tools we seemingly must work with. No reflection
> on your excellent work. Thanks for that!
> On Apr 3, 2019, at 10:46 AM, Alan Malloy <amalloy at google.com> wrote:
> > …The language should enforce shallow mutability (by making all fields
> final), and style guides should recommend that deep immutability.
More information about the amber-spec-observers