Re:On Apple's Love Affair with Swift
by h4b4n3r0 on Sunday August 12, 2018 @01:54AM
(#17743125)
An array of value types (including structs) in .NET (not just C#) is laid out contiguously in memory and stored in-place like an array of C/C++ structs would be. The problem of chasing pointers does not exist if you use structs (and don't use non-value types such as strings within those structs). And .NET value types are mutable, of course.
[ Parent
| on HN ]
Re:On Apple's Love Affair with Swift
by slavapestov on Monday August 13, 2018 @12:50AM
(#17748069)
Right, but the array itself has reference semantics.