permacomputing

Source repository for the main permacomputing wiki site
git clone http://git.permacomputing.net/repos/permacomputing.git # read-only access
Log | Files | Refs

Go.mdwn (2206B)


      1 Go is a general-purpose programming language created in 2007 designed primarily for the needs of server-side networked application programming.
      2 
      3 Go is often favoured for its portability, relative simplicity, ease of concurrent programming, performance and fast build times.
      4 
      5 There are several major implementations: [gc](https://go.googlesource.com/go), [gccgo](https://github.com/golang/gofrontend)/[gollvm](https://go.googlesource.com/gollvm/), [GopherJS](https://github.com/gopherjs/gopherjs) and [TinyGo](https://tinygo.org).
      6 
      7 Go has a published [language specification](https://go.dev/ref/spec) and a [v1 compatibility promise](https://go.dev/doc/go1compat) which is useful when considering long-term program maintenance.
      8 
      9 The loading of program dependencies is based on URLs. This implies always-on internet connectivity and typically centralised git repository hosting. A work-around for this is to use [vendoring](https://go.dev/ref/mod#vendoring) which supports downloading and bundling all program dependencies into the source tree.
     10 
     11 Go can be [[bootstrapped|bootstrapping]] with Go itself, or [[C]] (via `gccgo`/`gollvm`). However, with the introduction of generics, not all new versions of Go can be bootstrapped with C. `gccgo` supports [up to version 1.18](https://go.dev/doc/install/gccgo). It's also possible [to bootstrap from Go 1.4](https://go.dev/doc/install/source#bootstrapFromSource), the last version written in C.
     12 
     13 There are [language design decisions](https://tinygo.org/docs/concepts/faq/why-a-new-compiler/) which make Go unsuitable for embedded systems. The [TinyGo](https://tinygo.org) project aims to provide an alternative.
     14 
     15 Go binary sizes are [generally acknowledged](https://github.com/golang/go/issues/6853) to be [[bloated|bloat]]. For example, a binary size of [1.3 MB for 6 lines of code](https://dr-knz.net/go-executable-size-visualization-with-d3.html). The design of Go prioritises performance at the cost of memory, embedding considerable amounts of runtime information in produced binaries. Passing flags such as `-ldflags="-s -w"` to `go build` can aid in size reduction.
     16 
     17 Similar to [[Rust]], Go is largely dependent on [[Big Tech]] for resources and funding.