4 ms·
You would like to write an entire server without using a GC?
by devsquid 10y ago
You would like to write an entire server without using a GC?
- asolove 10y agoPresumably he is complaining about the GC implementation's characteristics, not its existence. You can read a description of the team's design decisions here: https://blog.golang.org/go15gc https://blog.golang.org/go15gc but a simple summary would be: memory is cheap and getting cheaper, so focus on making GC fast rather than small memory footprints.
- merb 10y agoactually thats what the Java G1GC (which will be the default in Java 9) does aswell. However I would still favor java instead of go
- stincity 10y agoHasn't go been improving the GC with it's rounds of updates to the language?
- kasey_junk 10y agoYes, with an emphasis on speed not memory.
- nameless912 10y agoAnd in my opinion, this is a great tradeoff. Ultimately, adding more RAM to a server (or clicking a button on the AWS console) is a very easy fix. However, reducing latency is almost never easy. If they can prevent GC stuttering, I'll take the higher memory overhead every time.
- tracker1 10y agoGC has gotten significantly better the last few releases, I don't think most applications will notice.
- haberman 10y agoPeople do it all the time. For example, in C++ with modern owning pointers like std::unique_ptr<> and std::shared_ptr<> it's really not that bad.
- dboreham 10y agoI would not like to write a server with GC. Source: I've written many servers in both C and Java and given the choice will never use a GC language again for a server. Holding out some hope for Rust..
- dikaiosune 10y agoThere are definitely some pain points building a server in Rust, but I think on the whole the tradeoff is worth it, and will become moreso as the ecosystem matures.
- netheril96 10y agoCare to elaborate?