Re:Why did we choose Rust to develop TiKV?
by amelius on Wednesday September 27, 2017 @04:57AM
(#15345997)
If you had lots of circularly referencing data structures, would it make more sense to choose a garbage-collected language like Go?
[ Parent
| on HN ]
Re:Why did we choose Rust to develop TiKV?
by int_19h on Wednesday September 27, 2017 @05:04AM
(#15346032)
Most circular data structures still have some node that is semantically the owner of the whole thing. Having true circular ownership is much rarer.
Re:Why did we choose Rust to develop TiKV?
by amelius on Wednesday September 27, 2017 @05:37AM
(#15346173)
Closures naturally generate cycles in the data dependency graph. A way out would be to copy the environment of a closure, but that would mean a performance penalty.
Re:Why did we choose Rust to develop TiKV?
by evincarofautumn on Wednesday September 27, 2017 @10:56PM
(#15354209)
Whether and how closures generate cycles, and consequently the best implementation strategy, depends heavily on the language, though. You might have a strictly nested call stack or thunks and continuations; shared mutable environments or immutable copies and moves; copyable environments or linear/affine closure types; boxed closures that can be stored in data structures or unboxed closures that can’t always; first-class or second-class closures; a GC to rely on or none; &c.