The full form of Go programming is Go language or Golang which is developed by google engineers. It is developed based on the C programming language. It is an open-source programming language. So, it is free to use. The advantages and disadvantages of this programming language and the way of installing it on Windows have been explained in this tutorial.
Advantages of Go language:
- It is portable and platform-independent.
- It is very easy to learn and maintain.
- It is suitable for any small and large projects.
- It has many built-in libraries.
- It does not require any virtual machine. So, it compiles faster.
- It can handle errors independently.
- It has many lightweight go routines that enable concurrent processing.
- It has a quick garbage collection feature.
- It is designed for writing programs for multi-core processors.
- It is useful for developing e-commerce websites that require handling millions of transactions.
Disadvantages of the Go language:
- The development time of the Go language is longer than other programming languages.
- It does not support generic functions.
- It is not compatible with function overloading.
- It has not object-oriented features like Python.
- It has less runtime safety compare to another programming languages.
Install Go language on Windows:
- Download the installer of Go language for Windows by opening the following URL.
https://go.dev/doc/install - Click on the installer file and install the Go language in your desired location.
- Open the command prompt and run the following command to check the installed version of the Go language.
go version
- Create a file named first.go with the following code in a particular location to print a simple message.
package main import "fmt" func main() { fmt.Println("Welcome to fahmidasclassroom") }
- Run the following command from the command prompt to execute the code. Here, the full path of the source code has been mentioned in the command. If you save the path of the source code in the environment variable you can mention the filename only.
- go run d:\go\first.go
- Now, you are ready to start programming by using the Go language. Good luck.