4 ms·
For writing complete programs I'd be inclined to agree that Rust could do pretty much everything Go could do. However, I'd be inclined to say the reverse is not
by onei 7y ago
For writing complete programs I'd be inclined to agree that Rust could do pretty much everything Go could do. However, I'd be inclined to say the reverse is not always true although in the vast majority of circumstances it will be.
- Thaxll 7y agoThis is actually not accurate, there are some simple task that are actually very hard to do because of the borrow checked that are trivial to implement in a GC language.
- 0815test 7y agoSurely not "because of the borrow checker", since it's trivial to relax its enforcement with very limited runtime overhead. The tasks that essentially require GC (and this is pretty much always the case, even wrt. C!) are those where you're dealing with general graphs, potentially with cycles, and where the overall profile is such that you can't simply deal with it by allocating everything within an arena and then wiping it when you're done. This is where something like LISP traditionally shines, but Go of course ships with a well-designed concurrent GC that makes it a viable candidate in this space.
- pjmlp 7y agoCertainly because of the borrow checker, try to implement a GUI using Gtk-rs to see how much fun it is, to the point that even the samples use macros to reduce the boilerplate of accessing widget data from event handler callbacks.