The Go Programming Langauge
The Go Programming Langauge
Introduction
Go is the open source system programming language developed by Google.
It is experimental.
22
History
The initial design was started in
Sep 2007 by, Robert Griesemer, Rob Pike, Ken Thompson.
The emergence of multi-core computers has generated worry and confusion. The developers are not happy with the construction speed. They have to wait while the code is compiling.
44
Features of Go
It is based on the C programming language. It is simple and easy. It provides high speed compilation It supports multi-core computers.
55
Features of Go
Runs on Linux and MAC OS-X Platforms. New versions also runs on Windows. It is type safe and memory safe. It uses two compliers i.e. Gccgo which uses GCC at the back end and 6g for 64-bit architecture and 8g for 32-bit.
66
Click to edit Master text styles Second level Third level Fourth level Fifth level
77
88
Data Types
int8,int16,int32,int64. uint8,uint16,uint32,uint64. Float32,float64. complex64 ,complex128. String. Other Types:ArrayType,SliceType,StructType,PointerType,Fun ctionType,InterfaceType,MapType,ChannelType.
99
Example Code
//To print Hello on Screen package main //name of package import "fmt //Package implementing formatted I/O. func main() { fmt.Printf("Hello,\n") }
1212
Compilation
Using gccgo:$ gccgo prog.go $ a.out Hello $ $ 6g prog.go # compile; object goes into prog.6 $ 6l prog.6 # link; output goes into 6.out $ 6.out Hello $
Using 6g:-
1313
A new System programming language over a long period. Very comfortable and productive language. Full Open Source inmplementation.
Conclusion
Reference
Thank You..!
1515