Go is a general-purpose language designed with systems programming in
mind.It was initially developed at Google in year 2007 by Robert
Griesemer, Rob Pike, and Ken Thompson. It is strongly and statically
typed, provides inbuilt support for garbage collection and supports
concurrent programming.
Programs are constructed using packages, for efficient management of dependencies. Go programming implementations use a traditional compile and link model to generate executable binaries.
The Go programming language was announced in November 2009 and is used in some of the Google's production systems
This tutorial assumes that you know how to edit a text file and how to write source code inside a program file.
Programs are constructed using packages, for efficient management of dependencies. Go programming implementations use a traditional compile and link model to generate executable binaries.
The Go programming language was announced in November 2009 and is used in some of the Google's production systems
Design Principles
- Support for environment adopting patterns similar to dynamic languages. For example type inference (x := 0 is valid declaration of a variable x of type int)
- Compilation time is fast.
- InBuilt concurrency support: light-weight processes (via goroutines), channels, select statement.
- Conciseness, Simplicity, and Safety
- Support for Interfaces and Type embedding.
- Production of statically linked native binaries without external dependencies.
Features excluded intentionally
To keep language simple and concise, following features commonly available in similar languages are ommitted.- No support for type inheritance
- No support for method or operator overloading
- No support for circular dependencies among packages
- No support for pointer arithmetic
- No support for assertions
- No support for generic programming
Go Programs
A Go program can vary from 3 lines to millions of lines and it should be written into one or more text files with extension ".go"; for example, hello.go. You can use "vi", "vim" or any other text editor to write your Go program into a file.This tutorial assumes that you know how to edit a text file and how to write source code inside a program file.
No comments:
Post a Comment