Upload
saurabh-gilalkar
View
230
Download
0
Embed Size (px)
Citation preview
8/3/2019 The Go Programming Langauge
1/15
Googles
Go ProgrammingLanguage
-:Seminar On:-
----------------------------------Saurabh S. Gilalkar
11
8/3/2019 The Go Programming Langauge
2/15
Go is the open source system programminglanguage developed by Google.
It is experimental.
It is simple and fast.
It can compile large programs inmilliseconds.
Introduction
22
8/3/2019 The Go Programming Langauge
3/15
The initial design was started inSep 2007 by,
Robert Griesemer,
Rob Pike,Ken Thompson. Officially announced in Nov 2009.
In May 2010, publicly stated that Gowas being used "for real stuff" at Google.
History
33
8/3/2019 The Go Programming Langauge
4/15
Need of developing
Go.. No major systems language has emergedin over a decade, but over that time thecomputing 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 waitwhile the code is com ilin . 44
8/3/2019 The Go Programming Langauge
5/15
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
8/3/2019 The Go Programming Langauge
6/15
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 atthe back end and 6g for 64-bit architecture and 8gfor 32-bit.
66
8/3/2019 The Go Programming Langauge
7/15
Click to edit Master text stylesSecond level Third level Fourth level Fifth level
77
8/3/2019 The Go Programming Langauge
8/15
What is Difference with
other languageSimplicity in code writingFew keywords, parsable without symbol table.
Free from use of semicolon(;).They are optional.
Go needs fewer parentheses for control
strusture like if, for and switch.It supports pointer concept,But in limited manner.
88
8/3/2019 The Go Programming Langauge
9/15
Data Types
int8,int16,int32,int64.
uint8,uint16,uint32,uint64.
Float32,float64.
complex64 ,complex128.
String.
Other Types:-ArrayType,SliceType,StructType,PointerType,FunctionType,InterfaceType,MapType,ChannelType.
99
8/3/2019 The Go Programming Langauge
10/15
Some Syntatical Difference
if Statementif x > 0
{ return y }
for Statment
for i := 0; i < 10; i++
{ //body of loop }
1010
8/3/2019 The Go Programming Langauge
11/15
Some Syntatical Difference
Direct variable decleration and Itializationi, j := 0, 10 //In C, int i=0,j=10;
Function Decleration:-func min(x int, y int) int
{ if x < y
{ return x }return y
}
1111
/*In Cint min(int x,inty){ if(x
8/3/2019 The Go Programming Langauge
12/15
Example Code
//To print Hello on Screen
package main //name of packageimport "fmt //Package implementing formatted I/O.func main()
{fmt.Printf("Hello,\n")
}
1212
8/3/2019 The Go Programming Langauge
13/15
Compilation
Using gccgo:- $ gccgo prog.go
$ a.out
Hello$
Using 6g:-
$ 6g prog.go # compile; object goes into prog.6$ 6l prog.6 # link; output goes into 6.out$ 6.outHello
$ 1313
8/3/2019 The Go Programming Langauge
14/15
ConclusionA new System programming language over a long period.Very comfortable and productive language.
Full Open Source inmplementation.
1414
ReferenceOfficial Website:- http://golang.org
8/3/2019 The Go Programming Langauge
15/15
Thank You..!
1515