Re:Swift at Apple: Migrating the Password Monitoring Service...
by CharlieDigital on Wednesday June 04, 2025 @07:21AM
(#44179471)
This seems like C# `record struct`
https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...
What java is getting in the future is immutable data values where the reference is the value.
When you have something like
in java, effectively the representation of `c` is a reference which ultimately points to the heap storage locations of `a, b`. In C++ terms, you could think of the interactions as being `c->b`.When values land, the representation of `c` can instead be (the JVM gets to decide, it could keep the old definition for various performance reasons) something like [type, a, b]. Or in C++ terms the memory layout can be analogous to the following: