Go (programming language)

Go
ParadigmMulti-paradigm: concurrent imperative, functional[1] object-oriented[2][3]
Designed byRobert Griesemer
Rob Pike
Ken Thompson[4]
DeveloperThe Go Authors[5]
First appearedNovember 10, 2009; 15 years ago (2009-11-10)
Stable release
1.23.3 / 6 November 2024; 15 days ago (6 November 2024)
Typing disciplineInferred, static, strong,[6] structural,[7][8] nominal
Memory managementGarbage collection
Implementation languageGo, Assembly language (gc); C++ (gofrontend)
OSDragonFly BSD, FreeBSD, Linux, macOS, NetBSD, OpenBSD,[9] Plan 9,[10] Solaris, Windows
License3-clause BSD[5] + patent grant[11]
Filename extensions.go
Websitego.dev
Major implementations
gc, gofrontend
Influenced by
C, Oberon-2, Limbo, Active Oberon, communicating sequential processes, Pascal, Oberon, Smalltalk, Newsqueak, Modula-2, Alef, APL, BCPL, Modula, occam
Influenced
Crystal, V

Go is a statically typed, compiled high-level general purpose programming language. It was designed at Google[12] in 2009 by Robert Griesemer, Rob Pike, and Ken Thompson.[4] It is syntactically similar to C, but also has memory safety, garbage collection, structural typing,[7] and CSP-style concurrency.[13] It is often referred to as Golang because of its former domain name, golang.org, but its proper name is Go.[14]

There are two major implementations:

  • The original, self-hosting[15] compiler toolchain, initially developed inside Google[16];
  • A frontend written in C++, called gofrontend[17], originally a GCC frontend, providing gccgo, a GCC-based Go compiler[18]; later extended to also support LLVM, providing an LLVM-based Go compiler called gollvm.[19]

A third-party source-to-source compiler, GopherJS,[20] compiles Go to JavaScript for front-end web development.

  1. ^ "Codewalk: First-Class Functions in Go". Go supports first class functions, higher-order functions, user-defined function types, function literals, closures, and multiple return values. This rich feature set supports a functional programming style in a strongly typed language.
  2. ^ "Is Go an object-oriented language?". Retrieved April 13, 2019. Although Go has types and methods and allows an object-oriented style of programming, there is no type hierarchy.
  3. ^ "Go: code that grows with grace". Retrieved June 24, 2018. Go is Object Oriented, but not in the usual way.
  4. ^ a b "Language Design FAQ". The Go Programming Language. January 16, 2010. Retrieved February 27, 2010.
  5. ^ a b "Text file LICENSE". The Go Programming Language. Retrieved October 5, 2012.
  6. ^ "The Go Programming Language Specification - the Go Programming Language".
  7. ^ a b "Why doesn't Go have "implements" declarations?". The Go Programming Language. Retrieved October 1, 2015.
  8. ^ Pike, Rob (December 22, 2014). "Rob Pike on Twitter". Archived from the original on April 7, 2022. Retrieved March 13, 2016. Go has structural typing, not duck typing. Full interface satisfaction is checked and required.
  9. ^ "lang/go: go-1.4". OpenBSD ports. December 23, 2014. Retrieved January 19, 2015.
  10. ^ "Go Porting Efforts". Go Language Resources. cat-v. January 12, 2010. Retrieved January 18, 2010.
  11. ^ "Additional IP Rights Grant". The Go Programming Language. Retrieved October 5, 2012.
  12. ^ Kincaid, Jason (November 10, 2009). "Google's Go: A New Programming Language That's Python Meets C++". TechCrunch. Retrieved January 18, 2010.
  13. ^ Metz, Cade (May 5, 2011). "Google Go boldly goes where no code has gone before". The Register.
  14. ^ "Is the language called Go or Golang?". Retrieved March 16, 2022. The language is called Go.
  15. ^ "Go 1.5 Release Notes". Retrieved January 28, 2016. The compiler and runtime are now implemented in Go and assembler, without C.
  16. ^ "The Go programming language". Retrieved November 1, 2024.
  17. ^ "gofrontend". Retrieved November 1, 2024.
  18. ^ "gccgo". Retrieved November 1, 2024. gccgo, the GNU compiler for the Go programming language
  19. ^ "Gollvm". Retrieved November 1, 2024. Gollvm is an LLVM-based Go compiler.
  20. ^ "A compiler from Go to JavaScript for running Go code in a browser: Gopherjs/Gopherjs". GitHub. Archived from the original on December 12, 2023.