3 ms·
Does it borrow borrow checker?
by vardump 4mo ago
Does it borrow borrow checker?
- deleted 4mo ago[deleted]
- anextio 4mo agoYes, it has a borrow checker.
- tialaramex 4mo agoI believe Swift tends to use reference counting and copy-on-write strategies. This, like GC, is less for the programmer to think about and doesn't require the semantic checks, but sometimes the performance cost is unacceptable compared to what you'd write in Rust.
- MBCook 4mo agoThey have either recently added or talked about a borrow style system in the language as a way to avoid more copies and speed things up/lower memory usage/help with asynchronous programming.
- airspeedswift 4mo agoYou can choose to use either refcounting or unique ownership for your types. For most use cases, refcounted (+ copy-on-write) is the best choice and is the default, but the truetype interpreter made extensive use of non-refcounted types to achieve this performance.
- pjmlp 4mo agoYou can pick and chose, and memory ownership is getting better in latest versions. Being more ergonomic is relevant enough for increasing language adoption, that possible improvements are now on Rust roadmap.