Go has GC and Rust doesn't. If you were to design an explicitly C-like language with memory safety and without GC, it would look a lot more like Rust than Go. The idea that Rust was designed by a bunch of C++ fans is absurd. Most of us were ML fans more than anything.https://twitter.com/Pessimizations/status/1154473316952023040 …
-
-
Yeah. That's kind of what strikes to me as similar in C and Go. They both sacrifice type safety, except one of them comes with memory unsafety and the other one comes with a GC. (Granted, that's a pretty big difference, but the root cause is the same, right?)
-
Go is only memory safe if you force the runtime to use a single OS thread. It's not memory safe by default. It doesn't pay the price of providing safety in the presence of data races like Java. The built-in map and slice types don't maintain memory safety during data races.
- 7 more replies
New conversation -
-
-
I don't follow. Do you claim this is the case if you did it the C way, i.e. without an abstraction or with macros?
-
How do you write a function receiving a slice like &[Type] and returning a reference to the initial value as &Type if you don't have generics? It needs to be generic based on the lifetime of the reference even if Type is a specific type rather than a generic type parameter.
- 4 more replies
New conversation -
-
-
Go also runs into safety issues due to lack of generics, eg. look at how the atomic module is implemented.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.