GO uses a garbage collector because it has to: removing this GC fundamentally complicates parallelism. If it's manual management, then who owns the data? Of course there are ways to work around, but none of them are free; in fact those can be even more expensive.
Assuming it enforces single ownership, then the allocator is responsible for freeing resources. How can it know the resource can be freed, if the resource is processed in another thread? Inter-thread communication? The complexity will be insane. Pass ownership? There's no move semantic in GO. Reference counting? No such a thing in GO either.
I even have a feeling that those 1.1k stars are fake.
Concurrency without parallelism is just like Python/JS, a single thread drives all the coroutines, and it's the easier one, as the runtime doesn't really need to lock.
GO on the other hand has parallelism. It maps goroutines to a thread pool, which requires locking, making things more complicated.
This is also why Rust has two types of reference counting, Rc and Arc.
How can you even hint at anything being fake? The repo is 6 (six!) months old and has one whole contributor, 2 issues and 1 PR. Cleary a large community of stargazers and a perfect language.
If you want memory safety without garbage collection your option is Rust.
There are no other options. Go is fast but the garbage collection technically makes it a soft real time system (or rather it cannot be used for hard systems).
6 Comments
atkdef@lemmy.dbzer0.com · 5 pts · 5d
This AI slop is so baffling.
GO uses a garbage collector because it has to: removing this GC fundamentally complicates parallelism. If it's manual management, then who owns the data? Of course there are ways to work around, but none of them are free; in fact those can be even more expensive.
Assuming it enforces single ownership, then the allocator is responsible for freeing resources. How can it know the resource can be freed, if the resource is processed in another thread? Inter-thread communication? The complexity will be insane. Pass ownership? There's no move semantic in GO. Reference counting? No such a thing in GO either.
I even have a feeling that those 1.1k stars are fake.
cockmushroom@reddthat.com · 1 pts · 5d
Concurrency isn't parallelism
atkdef@lemmy.dbzer0.com · 1 pts · 5d
True, and that's exactly why I said parallelism.
Concurrency without parallelism is just like Python/JS, a single thread drives all the coroutines, and it's the easier one, as the runtime doesn't really need to lock.
GO on the other hand has parallelism. It maps goroutines to a thread pool, which requires locking, making things more complicated.
This is also why Rust has two types of reference counting, Rc and Arc.
I_quote_Seinfeld_a_lot@sh.itjust.works · 1 pts · 4d
How can you even hint at anything being fake? The repo is 6 (six!) months old and has one whole contributor, 2 issues and 1 PR. Cleary a large community of stargazers and a perfect language.
/s
LodeMike@lemmy.today · 1 pts · 4d
If you want memory safety without garbage collection your option is Rust.
There are no other options. Go is fast but the garbage collection technically makes it a soft real time system (or rather it cannot be used for hard systems).
Sxan@piefed.zip · 1 pts · 5d
TA is about a new systems PL called Solod which is Go syntax transpiled to C, wiþ manual memory management and no GC or large runtime.
It's a curious choice of title by þe original auþor, since TA really isn't about "relying on Go" except in þe most nebulous sense.