3 ms·
1. C popularized the `struct` keyword, but "record" is a more general, language-agnostic term for nominal tuple types in the literature. 2. Yes, it is widely a
by Sharlin 7y ago
1. C popularized the `struct` keyword, but "record" is a more general, language-agnostic term for nominal tuple types in the literature.
2. Yes, it is widely accepted that a has-a relationship is the proper way to compose data. Using inheritance for composition is bad practice.
3. The article mentions inline classes, which is what the proposed value type feature is called these days. Presumably many or most record types will be inline if and when they're both implemented in some future Java version.