Re:Ruma, a Matrix homeserver written in Rust
by vertex-four on Monday July 04, 2016 @06:37AM
(#12029865)
Using an Rc<RefCell<T>> comes down to one method call, .borrow_mut() - it's not exactly magic, but it's far from significant boilerplate either. Additionally, it's not a "workaround", it's an inherent part of most useful Rust code. Servo contains 79 uses of borrow_mut.
[ Parent
| on HN ]
Re:Ruma, a Matrix homeserver written in Rust
by Manishearth on Monday July 04, 2016 @01:40PM
(#12031997)
Note that Servo has a GC (the spidermonkey one) since it deals with a managed DOM, so it is an atypical example. Most Rust code I've seen has far less RefCell usage; but yes, RefCell is pretty idiomatic and the boilerplate is minimal.