3 ms·
What do you mean, "structs are not"? As far as I can tell, structs do not exist in Java?
by skywhopper 7y ago
What do you mean, "structs are not"? As far as I can tell, structs do not exist in Java?
- kasperni 7y agoStructs in other similar languages, for example, C#
- xxs 7y agoMark Valhalla project has been in the minds of people caring about performance for about 16years now... Struct was a suggested name.
- masklinn 7y agoWhat they mean is that `struct` in GC'd heap oriented languages is generally considered an alias for "a value type", that's what it is in C# or Swift. Records are shortcut syntax (and some runtime improvements) for a specific category of simple classes but they remain a heap-allocated reference type so calling records "struct" would be extremely misleading and would preclude (and / or make even weirder) the eventual inclusion of user-defined value types.