Thanks Dan. That second point for enums, about how the best optimizations are already equally effective for both identity and (imaginary) value enums, is the real nail in the coffin. Otherwise, I certainly have made enums that would have the exact same data across different values. I use that pattern quite often, in fact.
And the point for Anonymous Classes makes sense. Thank you for your response! On Wed, Jul 15, 2026 at 9:14 PM Dan Smith <[email protected]> wrote: > > On Jul 15, 2026, at 5:32 PM, David Alayachew <[email protected]> > wrote: > > > > One quick question I have -- why are Enums and Anonymous Classes removed > from the list? > > Because it is impossible to declare a value enum or value anonymous class. > > For enums, we’ve considered in the language design, but concluded that (i) > much like singletons, there’s not much realistic benefit to having an > identityless enum: if you had two distinct instances that modeled the same > data, you wouldn’t declare two enum constants in the first place; and (ii) > it might be nice to flatten an enum reference, but the best kind of > flattening would apply equally well whether or not the instances have > identity, so that’s where we should focus our engineering attention. > > For anonymous classes, it’s mainly a syntactic problem: nowhere to put > modifiers. And there’s not much urgency to change that, because again, most > anonymous classes would not run into the situation where you’ve got two > instances modeling the same data, but with different identities. > >
