News for hackers. Stuff that matters.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram... by manmal on Wednesday January 11, 2023 @02:58PM (#34343754)
I haven’t read that much on Rust, but that should be pretty much it.

Swift has an emphasis on value types, which often are stored on the stack, but only up to a certain size. Copy-on-write makes this feasible - often, those value types are passed by reference until a write actually occurs, but that’s opaque to the dev. Value types can have pointers to reference-counted types - if a value type is passed/copied, any pointer it owns is retained (weirdly enough, they claim that value types have no „lifetime“, but at some point those refs have to be released - we just have to trust the compiler in this).

There are no comments on this comment yet.