|
> Rust, Go, Swift, etc. Even C++. If you carefully read my post, you noticed C here means actually C(++). And a great majority of developers from these domains actually write C++ like this: C(++). Rust, Go, Swift. Show me the serious kernels, databases, AAA games. Rust hasn't even descended the hype train. Garbage collection is a bit like exceptions. It works for some cases, but not for serious engineering of long-lived applications. If you have ever written a Java application with millions of little objects, you know what I mean. For starters, we can not even afford to pay for the extra memory overhead that comes with each object. For the advanced, at some point we want the application to do exactly that: advance, instead of doing GC only. > I take it you haven't used Go. It has slices. They work fine. No buffer overflows. These slices all come with the (huge) overhead of adding a reference to the original runtime object, and on top of that each array access is checked. Correct? |
Oh come on. Does Lucene (or Solr or Elasticsearch built on top of it) not qualify as serious engineering? Elasticsearch is quite successful, and is indeed intended to be used a long-lived application!
Does this mean that the likes of Lucene don't run into GC issues? Of course not. I've certainly diagnosed problems in Elasticsearch related to GC (which, more often then not, is a symptom of something else going wrong), but saying it's not qualified for "serious engineering" is just patently ridiculous.
And that's only one example. There are loads more!
> These slices all come with the (huge) overhead of adding a reference to the original runtime object
Huh? This is the representation of a slice: https://golang.org/pkg/reflect/#SliceHeader --- It's pretty standard for a dynamically growable region of memory.