Eight years of Go
Go is woefully missing some really key features, which you encounter when tuning it for high performance. My list of grievances:<p>- Dep handling was never considered. Makes sense given Google&#x27;s monorepo but thats not how the world works.<p>- Stdlib just loosely wraps posix features with many C flags copied verbatim. These APIs are old and could use a refresh but Go never bothered.<p>- No easy way to construct arenas&#x2F;pools. Once you go down this route you have a great headache of releasing in the right places. The GC doesn&#x27;t cut it, you need pools sometimes<p>- Debugging basically doesn&#x27;t work on some OSes. No easy way to attach gdb and see what&#x27;s happening. Doubly so if you use Cgo<p>- Similarly, Go doesnt bother to hide the differences of different OSes. Up to you as the programmer. Again not surprising for Google&#x27;s all Linux world. If everything is Linux then OS difference doesnt matter. But even Python does a better job here.<p>- Logging is poorly thought out as evidenced by multitude of third-party log packages. Anemic compiler means you can&#x27;t get verbose logging without paying a performance penalty.<p>- No RAII. Defers are a lazy attempt at this, but they&#x27;re not even close to being as good as RAII. This is probably the biggest point where you realize Go can&#x27;t dethrone C++<p>- Tricky Close() semantics force you to architect entire program around who will close() things at end of their lifetime. Lots of terrible hacks ensue when people build something that works but realize close ownership is ambiguous and rightfully don&#x27;t want to rebuild it all<p>- Channels don&#x27;t have a good way to deal with errors. You&#x27;re forced to come up with an ad hoc solution to deal with your graph of goroutines&#x2F;channels when one node errors<p>- No supervision tree. Erlang existed far before Go but they didn&#x27;t learn from this key feature. But it would greatly enhance Go to have it<p>- Hacky reflection semantics that cause subtle runtime bugs when a JSON struct field&#x27;s name starts with a lowercase letter. And of course, there are no generics, the larger issue here.<p>I was hopeful that Go would fix some of these things before it went 1.0 and locked in its syntax. Sadly that didn&#x27;t happen as it was likely already locked in at Google. Go is ultimately kind of brain dead, useful for some very particular features but not so compelling that it can replace any other language.