Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You would like to write an entire server without using a GC?


I 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..


There 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.


Care to elaborate?


Presumably 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 but a simple summary would be: memory is cheap and getting cheaper, so focus on making GC fast rather than small memory footprints.


Hasn't go been improving the GC with it's rounds of updates to the language?


Yes, with an emphasis on speed not memory.


actually thats what the Java G1GC (which will be the default in Java 9) does aswell.

However I would still favor java instead of go


And 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.


GC has gotten significantly better the last few releases, I don't think most applications will notice.


People 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: