Go Programming Language
(Redirected from Go language)
Jump to navigation
Jump to search
A Go Programming Language is a statically-typed compiled language loosely based on the C language.
- AKA: golang.
- Context:
- It can aim to achieve the Programming Ease (similar to dynamic languages).
- It can aim to be Type-Safe and Memory-Safe.
- It can aim to support Program Concurrency and Program Communication.
- It can aim to have fast Program Compilation.
- It can have a lightweight Type System (with untyped unsized constant).
- Example(s):
- Counter-Example(s):
- See: Automatic Memory Management, Type Safety, Dynamic Typing, Variable-Length Array.
References
2017a
- (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/Go_(programming_language) Retrieved:2017-3-28.
- Go (often referred to as golang) is a free and open source [1] programming language created at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is a compiled, statically typed language in the tradition of Algol and C, with garbage collection, limited structural typing, memory safety features and CSP-style concurrent programming features added.
2017b
- (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/Go_(programming_language)#History Retrieved:2017-3-28.
- The language was announced in November 2009. It is used in some of Google's production systems, as well as by other firms.
Two major implementations exist:
- Google's Go compiler, "gc", is developed as open source software and targets various platforms including Linux, OS X, Windows, various BSD and Unix versions, and also, since 2015, mobile devices, including smartphones. *A second compiler, gccgo, is a GCC frontend. The "gc" toolchain has been self-hosting since version 1.5. Go originated as an experiment by Google engineers Robert Griesemer, Rob Pike, and Ken Thompson to design a new programming language that would resolve common criticisms of other languages while maintaining their positive characteristics. The new language was to include the following features: [2] * be statically typed, scalable to large systems (as Java and C++) * be productive and readable, without too many mandatory keywords and repetition ("light on the page" like dynamic languages) * not require integrated development environments, but support them well * support networking and multiprocessing
- In later interviews, all three of the language designers cited their shared dislike of C++'s complexity as a primary motivation for designing a new language. Go 1.0 was released in March 2012.
- The language was announced in November 2009. It is used in some of Google's production systems, as well as by other firms.
2017c
- (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/Go_(programming_language)#Criticism Retrieved:2017-3-28.
- Go critics assert that:
- lack of compile-time generics leads to code duplication, metaprogramming cannot be statically checked[1][2] and standard library cannot offer generic algorithms[3]
- lack of language extensibility (through, for instance, operator overloading) makes certain tasks more verbose [4]
- the type system's lack of Hindley-Milner typing inhibiting safety and/or expressiveness[5][6]
- the pauses and overhead of garbage collection (GC) limit Go's use in systems programming compared to languages with manual memory management.
- The language designers argue that these trade-offs are important to Go's success,[7] and explain some particular decisions at length,[8] though they do express openness to adding some form of generic programming in the future, and to pragmatic improvements in areas like standardizing ways to apply code generation.[9] Regarding GC, Go defenders point to pause-time reduction in later versions[10][11] (e.g. Go 1.6), while acknowledging their GC algorithm is not hard real-time.[citation needed]
- Go critics assert that:
2017d
- (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/Go_(programming_language)#Conventions_and_code_style Retrieved:2017-3-28.
- The Go authors put substantial effort into molding the style and design of Go programs:
- Indentation, spacing, and other surface-level details of code are automatically standardized by the
gofmt
tool.golint
does additional style checks automatically. - Tools and libraries distributed with Go suggest standard approaches to things like API documentation (
godoc
), testing (go test
), building (go build
), package management (go get
), and so on. - Go enforces rules that are recommendations in other languages, for example banning cyclic dependencies, unused variables or imports, and implicit type conversions.
- The omission of certain features (for example, functional-programming shortcuts like
map
and C++-styletry
/finally
blocks) tends to encourage a particular explicit, concrete, and imperative programming style. - On day one the Go team published a collection of Go idioms, and later also collected code review comments, talks, official blog posts to teach Go style and coding philosophy.
- Indentation, spacing, and other surface-level details of code are automatically standardized by the
- The Go authors put substantial effort into molding the style and design of Go programs:
- ↑ Will Yager, Why Go is not Good
- ↑ Egon Elbre, Summary of Go Generics discussions
- ↑ Fitzpatrick, Brad. "Go: 90% Perfect, 100% of the time". https://talks.golang.org/2014/gocon-tokyo.slide#50. Retrieved 28 January 2016.
- ↑ Danny Gratzer, Leaving Go
- ↑ Jared Forsyth, Rust vs. Go
- ↑ Janos Dobronszki, Everyday Hassles in Go
- ↑ Rob Pike, Less is exponentially more
- ↑ The Go Authors, Frequently Asked Questions (FAQ)
- ↑ Rob Pike, Generating code
- ↑ Rhys Hiltner (2016-07-05). "Go’s march to low-latency GC". Twitch.tv. https://blog.twitch.tv/gos-march-to-low-latency-gc-a6fa96f06eb7#.68hdx6qc1. "It’s the story of how improvements to the Go runtime between Go 1.4 and Go 1.6 gave us a 20x improvement in garbage collection (GC) pause time, of how we’ve gotten another 10x improvement in Go 1.6’s pauses, and of how sharing our experience with the Go runtime team helped them give us an additional 10x speedup in Go 1.7 while obsoleting our manual tuning."
- ↑ Richard Hudson, Go 1.4+ Garbage Collection (GC) Plan and Roadmap