Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
millstone
on Feb 6, 2019
|
parent
|
context
|
favorite
| on:
Swift 5 Exclusivity Enforcement
Are you sure that code expresses the same pattern? It looks like Rust's COW can only transition from Borrowed to Owned by making a copy. Swift's COW works by dynamically inspecting the reference count.
giornogiovanna
on Feb 6, 2019
[–]
Right, unless I'm mistaken, what you want is `Rc` with `Rc::make_mut`[0], not `Cow`.
[0]:
https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#metho...
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: