Interesting Facts About Golang:
- Google wanted an alternative to C++ and solves the issues of software engineering, this gives rise to the development of the Go programming language.
- Go is supported on almost every Operating system like DragonFly BSD, FreeBSD, Linux, macOS, NetBSD, OpenBSD, Plan 9, Solaris, and Windows.
- Go provides 2 features that are capable of replacing Class inheritance. The first is embedding and the other is interfaces.
- Go has garbage collection which automatically performs memory management and permits deferred execution of functions.
- In Go language, we don’t need to put a comma (, ) at the end of statements like Python.
- There is a special Keyword in Go called ‘defer‘, which delays the execution of a method or function until the nearby function returns.
- Go has a special built-in function known as ‘make‘, which is used to create slices, maps, and channels.
- If any variable or package is declared but not used then, the Go compiler will show an error.
- In Go, there is a new data type known as ‘slice‘, which has a more powerful interface to sequences as compared to Arrays.
- Sometimes we want to import packages only for their side effects, without exploiting their use like import _ “net/ http/ pprof”. For this purpose, the Go language is very useful.
- The ‘Goroutines‘ is a special function in Go, which runs concurrently with other functions or methods.
- In order to establish communication between goroutines. There exists a pipe known as ‘Channels‘.
- Satisfaction with debugging (including debugging concurrency), using modules, and using cloud services. Each of these topics was rated “very” or “critically” important by a majority but significantly lower satisfaction scores compared to other topics.
- Respondents use Golang in roughly similar ways whether they work at a small tech start-up or a large retail enterprise.