Re:Moving from TypeScript to Rust / WebAssembly
by hombre_fatal on Thursday July 09, 2020 @08:59AM
(#23779686)
Yep.
When I'm writing Go, I spend the whole time yearning for the abstractions of Rust, becoming a little more bitter each time I copy and paste or have to manually reify interface{}, knowing my ceremonious verbose Go code is slower than the simpler compact Rust solution.
When I'm writing Rust, I'm loving life until I hit this sort of "intractable" [for me] problem, and I wonder if I should have used Go for this part.
Re:Moving from TypeScript to Rust / WebAssembly
by steveklabnik on Thursday July 09, 2020 @09:17AM
(#23779826)
That is true if you have to write your own. 99.99% of the time, if you need a graph, you use petgraph and move on with life.
Re:Moving from TypeScript to Rust / WebAssembly
by jfkebwjsbx on Thursday July 09, 2020 @08:35AM
(#23779493)
Reference-counted graphs are usually quite fine.
Rust does have these sorts of issues wrt. managing highly generic graph-like data, possibly with cycles. That's where tracing GC actually shines, and where writing that whole portion separately in something like Go might be the right answer.