Skip to content

Go pain points

Ayke edited this page Nov 22, 2018 · 6 revisions

Pain points in the current Go implementation

Here are a few pain points of the Go language and standard library, as it is currently implemented. More details below.

  • [high] The Go standard library is closely coupled with the runtime. This is very problematic, because it forces numerous hacks and workarounds to be able to use standard library packages from Go code.
  • [high] Package initialization order forces sequential initialization of globals.
  • [medium] No support for volatile variables. This has been worked around with compiler pragma's (//go:volatile), but some sort of language support would be useful. Volatile variables are commonly used to directly access memory mapped peripherals.
  • [low] No support for bitfields. It would be useful to be able to split up a struct field into multiple pieces like in C, to reduce memory consumption and because some memory-mapped I/O is much easier to implement with this.
  • [low] No support for binary numbers. Bit twiddling is very common in embedded software. It would be useful to be able to write constant numbers with a 0b prefix like in Python, for example 0b11001010 (0xca).
Clone this wiki locally