5 ms·
Of course, being a Go expert does not make you a GC expert automatically. You need to be both. But why should you also be a C expert? Adding another whole field
by _ph_ 10y ago
Of course, being a Go expert does not make you a GC expert automatically. You need to be both. But why should you also be a C expert? Adding another whole field of expertise to the requirements does not sound like an improvement.
And everything written in Go also means you are dealing with just one compiler and not two, if you mix Go and C code.
- chrisseaton 10y agoI don't think you should also have to be a C expert, but I am suggesting that, in practice, there is nobody in the world who is proficient in garbage collection who does not also know C. I think if you learned everything needed to understand GC, but were never exposed to C, you would already know enough to pick the language up in a couple of hours. Nobody is going to turn up in the Go IRC room saying that they have a great idea how to reduce pause times by improving the work-stealing between concurrent markers by using a better lock-free queue algorithm, except do'h they don't know C. I get your point about just one compiler though - less moving parts is good.
- geodel 10y agoOne benefit you miss is by using Go in GC all Go tools (fmt, profiler, vet, godoc lints etc) available to writers of GC also which was not possible with C. I think it is similar to Oracle was trying to JVM in Java known as Maxine. Now JVM contributors or potential contributors would know C++ but from OpenJDK website one motivation was to leverage amazing Java tooling to write its own VM. I just noticed Oracle seems to have removed references to Maxine VM from Oracle website and OpenJDK website. Seems that project is no longer active.
- chrisseaton 10y agoTry searching for Graal instead. https://github.com/graalvm/graal-core https://github.com/graalvm/graal-core
- geodel 10y agoThanks. From the link: > Graal is a dynamic compiler written in Java that integrates with the HotSpot JVM I am not sure if this is Maxine VM which I thought something analogous to Hotspot JVM. Or may be Maxine was similar in scope as the link you have given and not an experimental or otherwise replacement of Hotspot JVM
- sievebrain 10y agoIt isn't Maxine. I believe Maxine lives on in the Oracle-only "Substrate" project. But there is also Jikes which is a similar jvm-in-java project.
- chrisseaton 10y agoIt's the JIT compiler written in Java that was in Maxine, updated, integrated into Hotspot so you don't need to use an experimental VM to use it. Maxine is still alive though - but I think the only people maintaining it are academics.
- geodel 10y agoOk, makes sense. Maxine might be now independent of Oracle as links from Oracle website goes nowhere.
- TickleSteve 10y agoequivalents to all those tools (and more) are available in the C ecosystem.... just saying.... BTW: C is a much more mature ecosystem than that of Go.
- _ph_ 10y agoNo one doubts that there is a rich ecosystem available for C. The thing just is, when you are working in a Go environment, what benefit would adding C with its own toolchain bring?
- coldtea 10y agoNo need for bootstrapping step, 90% of portability taken care off for free, ability to use lower level and faster primitives than Go offers, access to tons of great C libraries.
- ngrilly 10y ago> ability to use lower level and faster primitives than Go offers Like what? Go's unsafe code is free from doing almost anything (except things like array bound checks that are always enforced).
- koffiezet 10y ago> 90% of portability taken care off for free You sir, have clearly never attempted to write portable C or Go code. Writing portable C code takes a serious effort. It's not hard if you know what you have to pay attention to - but 90% portability taken care of for free? That's simply not true, unless you think being portable is "it runs on a POSIX system". Writing portable Go code - in most cases - you don't need to do anything or make only slight changes to your code, and cross-compiling is the easiest I've ever encountered.
- deleted 10y ago[deleted]
- drivebyops 10y agoNot the build system, a pain to get the libraries in Windows for a Multiplatform project that I wanna compile. Where in Go this is very easy
- cbsmith 10y agoThere have been similar Smalltalk-in-Smalltalk, Lisp-in-Lisp, and Java-in-Java, etc. projects. I have yet to see one that lead to better garbage collection.
- heavenlyhash 10y ago> Nobody is going to [...] have a great idea how to reduce pause times by improving the work-stealing between concurrent markers by using a better lock-free queue algorithm, except do'h they don't know C. I think you do yourself a disservice to discount that. I'll happily tell you about places in the go runtime where we could use some smarter memory fencing instructions to build faster lock-free queues on x86_64. I also don't write C. (Well, I'm trying to write a patch to libgit2 right now, but really, the operative word there is "trying": it's just highlighting it all the more clearly: I don't know C.) I learned about the memory fence instructions while doing concurrent programming in java. The notion that C is the only bridge we can cross -- or the right bridge to cross -- to get to assembly (or any other abstraction layers necessary for high performance engineering) is absurd. We can put it to rest now.
- _RPM 10y agoI'd argue that Garbage Collection and the Go language are mutually exclusive.
- coldtea 10y ago>Of course, being a Go expert does not make you a GC expert automatically. You need to be both. But why should you also be a C expert? You shouldn't, but historically and statistically GC experts and compiler experts are also C experts. And it's not like "Go is written in Go" that gonna change that (we've had languages written in themselves for half a century and still most compilers are written in C/C++).