3 ms·
This is the best outline of the Go generics issue I've seen. As an outsider to the language (for now), thanks for writing this. What's the current conversation
by guscost 8y ago
This is the best outline of the Go generics issue I've seen. As an outsider to the language (for now), thanks for writing this.
What's the current conversation on sharing binary code? Unless I'm missing something, this is fundamentally incompatible with generic functions that are optimized at compile time. Either the compiled version has to have implementations for "every valid type" or the shared code must be recompiled at the time it is consumed, right?
It looks like the Go ecosystem tends to discourage distributing precompiled binary packages, so maybe this is not a real issue.
- kbsletten 8y agoIf I remember correctly, Go was only allows source packages and does whole-program optimizations. They designed their compiler to be fast to enable this.
- thefounder 8y agoWhy would you use binary code when Go compiles so fast?
- nimrody 8y agoPlugins. Go programs typically use RPC to communicate with plugins instead of loading dynamic libraries and calling functions in these libraries.
- grok2 8y agoGoing meta regarding tech articles, I find that it is easy to read some text-heavy articles (this being one of them) while my eyes glaze over other text-heavy articles (I couldn't easily follow Dave Cheney's article on the same topic of Go generics a few days back, though with a slightly different focus and much shorter). I've wondered what is it about specific pages/articles/writing that make them flow nicely and make it easy to read -- is it the layout of the page (font/font-size/other styling) or is it how the writing flows together or is it a factor of how much thought the author put into presenting what they are thinking or is it me (time of day, interests, etc). Maybe it is just everything!
- guscost 8y agoWhile the typesetting helps here, I think a lot is due to the writing style. Writing easy-to-read content is difficult, and it’s usually not that obvious when you’re reading it, because you’re absorbing the concepts rather than struggling with the language.
- coldtea 8y agoObviously it's the writing. You can use "reader" mode on your browser (or with an extension) to verify this.