Package Private Record Fields
Ty Young
youngty1997 at gmail.com
Mon May 4 18:17:12 UTC 2020
On 5/4/20 8:20 AM, Brian Goetz wrote:
>
>
>> How is this any different then default?
>
> Because with classes, the user has a chance to say "private" and get
> it right; if records worked this way, no one would ever have a chance
> to get it right. So this would be a poor language design choice,
> because it would make what was a questionable default into a
> questionable permanent reality.
>
> I agree that the default accessibility for classes was ill-chosen, but
> that doesn't mean we should go ahead and make more mistakes just
> because a mistake was made in the past.
>
I wasn't talking about visibility modifiers. I was talking about the
default accessor behaviour for List, Map, Optional, etc. Which is why I
asked whether or not overriding the default accessor was an indicator
that you were trying to use records for something they aren't meant for.
Records are supposed to be transparent data holders, right?
>And, by the way, you have drifted far from the charter of this list,
which explicitly does not include "arguing about language design." It
was fair for August to ask his "why not" question, and he got his
answer. (And the more constructively the question is asked, the more
latitude is given when something nudges up against the line.)
"We are Oracle and make all the decisions around here. Do not question
us, even when we confusingly contradict ourselves."
I didn't realize the community aspect of OpenJDK was just a facade and
Oracle isn't interested in meaningful community feedback. Even if you
wanted to ignore my feelings on records(because, yes, I know I'm a bit
thorny), other people have (nicely and constructively) brought up time
and time again their own and you've just ignored them.
Someone even converted a bunch of JavaFX classes to records, did a long
writeup, and was ignored! Even if they were trying to use records for
something it was intended for, it's still useful in that it indicates
current explanations of what *is* a record might not be clear enough or
maybe, *just maybe*, records are way too strict and over-engineered.
You keep talking about these mailing lists as if they are some sacred,
holy things that must never be defiled but you(Oracle) don't even use
for their intended purpose. It has been said multiple times on the
Panama list that offline, internal discussions have been made and
decisions based on those discussions have been made. If hypothetically
someone outside of Oracle wanted to directly contribute to Panama, how
could they possibly do that? This is to say nothing of the comments
towards other people on these lists, whether or not they were intended
to offend...
Not trying to light any fires here. I'm just saying: this is not how you
run a "community" driven project or respond to comments or questions.
More information about the amber-dev
mailing list