You are on page 1of 15

-:Seminar On:-

Googles Go Programming Language ---------------------------------Saurabh S. Gilalkar


11

Introduction
Go is the open source system programming language developed by Google.

It is experimental.

It is simple and fast.

It can compile large programs in milliseconds.

22

History
The initial design was started in
Sep 2007 by, Robert Griesemer, Rob Pike, Ken Thompson.

Officially announced in Nov 2009. In May 2010, publicly stated that Go


was being used "for real stuff" at Google.
33

Need of developing Go.. No major systems language has emerged


in over a decade, but over that time the computing landscape has changed tremendously.

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

What is Difference with other language


Simplicity in code writing Few keywords, parsable without symbol table. Free from use of semicolon(;). They are optional. Go needs fewer parentheses for strusture like if, for and switch. control

It supports pointer concept,But in limited manner.

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

Some Syntatical Difference


if Statement if x > 0 { return y }

for Statment for i := 0; i < 10; i++ { //body of loop }


1010

Some Syntatical Difference


Direct variable decleration and Itialization i, j := 0, 10 Function Decleration:func min(x int, y int) int { if x < y { return x } return y }
1111 /*In C int min(int x,inty) { if(x<y) {return x;} return y; }*/
//In C, int i=0,j=10;

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

Official Website:- http://golang.org


1414

Thank You..!

1515