Paper 2126
Paper 2126
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Abstract: When developing software today, we still use old tools and ideas. Maybe it is time to start
from scratch and try tools and languages that are more in line with how we actually want to develop
software. The Go Programming Language was created at Google by a rather famous trio: Rob Pike, Ken
Thompson and Robert Griesemer. Before introducing Go, the company suffered from their development
process not scaling well due to slow builds, uncontrolled dependencies, hard to read code, poor
documentation and so on. Go is set out to provide a solution for these issues. The purpose of this
master’s thesis was to review the current state of the language. This is not only a study of the language
itself but an investigation of the whole software development process using Go. The study was carried
out from an embedded development perspective which includes an investigation of compilers and cross-
compilation. We found that Go is exciting, fun to use and fulfills what is promised in many cases.
However, we think the tools need some more time to mature.
I. INTRODUCTION
In programming language discussions a quote from Lawrence Flon often shows up “There does not now, nor will
there ever, exist a programming language in which it is least bit hard to write bad programs.” This is important to have
in mind when trying a new programming language: we cannot expect it to be perfect because a bad programmer will
always find a way of misusing the language structures. We should instead focus on how the language helps developers
in using good coding practices. Go cannot let us do things that are not possible with other languages but the question is
how the language lets us do it. For example thread synchronization can be achieved in Java but maybe it is easier to do
in Go.
First the package is specified, in this case the main package since this package will contain a main function. After
that we have a list of imported packages, in this case the standard string formatting package. The imported package can
either refer to a local package on the system or can be a URL as described in section 2.3.5. Then we see a declaration of
the main function comes, with no arguments and no return value. As can be seen, statements in Go are not semicolon
terminated1. Also notice that type visibility is determined by the first letter of the name like the Println() function from
the fmt package. Type names beginning with a capital letter are exported whereas lower cased names are not visible
outside the defining scope.
3.1 Types in Go
var i int // All Go types have
sensible zero values , 0
here .
2 j := 3.14 // Type is inferred , float64 on our machine .
3 str0 := " gopher "
4 var str1 * string = & str0 // str is a pointer to a string
Copyright to IJARSCT DOI: 10.48175/IJARSCT-2126 331
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
Declaring types from left-to-right feels strange in the beginning for a C-programmer, but it does not take long before
it becomes natural. To further illustrate how much of a difference this means for complex types, compare the two
equivalent programs written in C and Go in listing 2.3 and 2.4. They declare (at line number 1) a new type that is an
array of size one of functions that takes a pointer to integer and returns a string. It is worth to notice that in Go we do
not take the address of a function as functions are "first-class" i.e. directly supported as a value.
IV. OBJECT-ORIENTATION
Since Go is a modern language, we would expect the common Objectorientation2 definition to include it. An object is
also defined as a context that represents a concept, manages information and provides ways to function on it. Is object-
oriented the C language? Not built-in to the language, but by using a framework as the means, object-oriented actions
can be emulated. To store data and then store function pointers in the structure. The operation that can be performed on
the object. The implementation of a dynamic dispatch table 3 can also take it further.
V. CONCLUSION
Overall it was really useful to understand the concept of new programming language and to understand why its differ
from other languages and so on, for me the interesting features which attracted myself to GOLANG is its concurrency,
channels, interfaces, inheritance, unit testing, packages, so overall Go is a language, easy to learn for fresher’s compare
to the other experienced developers, because they can quickly understand and adopt. An experienced C# developer, will
take some time to understand the changes, if someone is open minded and willing to unlearn some standard
programming concepts he learned and practiced in Java or C#.
REFERENCES
[1]. Erik Westrup .Master’s thesis work carried out at Axis Communications AB for the Department of Computer
Science, Lund University.
[2]. Fredrik Pettersson. Master’s thesis work carried out at Axis Communications AB for the Department of
Computer Science, Lund University.