Skip to content

Commit 6196eb8

Browse files
jonasgeilergadilashashank
authored andcommitted
Add Golang part, (#39)
* working on Golang part, add text to misc.md, disadvantages.md and conclusion.md soon, request: check grammar in files that I added. * fixed errors from mdlint output * Edits and grammar * edits * Update intro.md * Update advantages.md * Update advantages.md * added more Golang things, edited intro.md, added stuff to disadvantages.md, misc.md (with code examples) and conclusion.md * changed grammar things, added few words to intro.md * Update README.md
1 parent f6c3b2e commit 6196eb8

7 files changed

Lines changed: 150 additions & 0 deletions

File tree

book/languages/golang/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Hi there
2+
3+
> This chapter was made by Skayo.
4+
5+
Welcome to the Golang part!
6+
I hope you'll enjoy this chapter.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Advantages of Golang
2+
3+
## Here are some advantages of using it
4+
5+
* **Go compiles directly into machine code**. The compilation is fast, **cross-platform compatible** and it creates only
6+
one executable file without dependencies.
7+
8+
* It is **safe**, as it uses strong and static typing. Also, garbage would be collected automatically and
9+
you can make really reliable software using Go.
10+
11+
* It supports some kinds of **object-oriented programming (OOP)** and interfaces.
12+
13+
* You can attach functions to any type. That's real flexibility.
14+
15+
* Also, Golang supports functional programming features like **anonymous functions**, **closueres** and **first-class functions**.
16+
17+
* Common utilities like **HTTP fetching**, **JSON parsing** and **encryption** are included by default in Go in the form of standard libraries.
18+
19+
* Go has great built-in command-line tools (ex. **auto-formatting your code**, **test coverage reporting**, **refactoring tools**).
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Conclusion
2+
3+
Some say that now is just a hype for Golang.
4+
Some say that Golang is hipster programming language.
5+
But I'll say something more.
6+
7+
+I think the Golang is usefully language, specially for backend applications.
8+
+It's really fast, and for some, syntax similar to C would be an advantageous point.
9+
10+
## Sources
11+
12+
* [**Wikipedia**](https://en.wikipedia.org/wiki/Go_(programming_language))
13+
14+
* [**Quora**](https://www.quora.com/What-are-the-advantages-and-disadvantages-of-Golang)
15+
16+
* [**Awesome Go**](https://github.com/avelino/awesome-go#database)
17+
18+
## Regarding authors
19+
20+
This chapter was made by [Skayo](https://github.com/Skayo) with grammar corrections made by [Gadila Shashank Reddy](https://github.com/gadilashashank).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Disadvantages of Golang
2+
3+
## Some `bad` stuff about Golang
4+
5+
* *No support for generics*, but Golang team is *still* thinking about adding it.
6+
7+
* **Smaller amount of packages** compared to Node.js or Ruby.
8+
9+
* *No support* for overloading a function.
10+
11+
* Some may like, some may hate, Golang is an **imperative** type of language.

book/languages/golang/history.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# History
2+
3+
## Far, far away in a company called **Google**... was created the Golang programming language
4+
5+
It was announced in **November 2009**,
6+
but its 1.0 version was released in **March 2012**.
7+
8+
It's originally designed by **Robert Griesemer**, **Rob Pike** and **Ken Thompson**.
9+
They were **Google** engineers and Go was an experiment.
10+
11+
They wanted to make programming language:
12+
13+
* that **doesn't require** IDE but with support for them,
14+
15+
* that **supports** networking and multitasking,
16+
17+
* that **is productive and readable**, without excessive boilerplate (like Ruby or Python has),
18+
19+
* that **is statically typed** and **scalable** to large systems (ex. Java or C++).
20+
21+
## Golang now
22+
23+
Now Golang is used in some of **Google** production systems, but it's well-recognized language on whole Earth.

book/languages/golang/intro.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Introduction
2+
3+
## Inception
4+
5+
**Golang** (GO) is another high-level programming language.
6+
It's usually used to make **backend stuff**.
7+
`Backend stuff`, I mean, for example rest API for your website, CMS for your website or chatbot.
8+
But, as it always is, the community made a lot of frameworks based on Golang,
9+
for example, A framework to use Golang as a frontend language (ex. **Buffalo**).
10+
11+
Also, you can create Desktop UI in Golang.
12+
Amount of frameworks for Golang is not such a big deal as it was for JavaScript,
13+
but it's nice to have something more than just pure language.
14+
15+
## More engineering stuff here
16+
17+
Golang is a statically typed compiled language in the tradition of C, but with some more features.
18+
Overall, **Go's syntax is similar to C's syntax**.
19+
20+
That features as I said are for example:
21+
22+
* **garbage collection**
23+
24+
* **structural typing**
25+
26+
* **concurrent programming**
27+
28+
Tools for Golang, compiler and source code of Golang are free and open-source.
29+
30+
If you want to see the full list of Golang libraries, packages, and stuff, you can see it [here](https://github.com/avelino/awesome-go#database).
31+
32+
> The file extension for Golang is **.go**

book/languages/golang/misc.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Some interesting things about Golang
2+
3+
* **Twitch.tv**, an IRC based chat was migrated from Python to Golang
4+
5+
* **SoundCloud** says they use Golang for ``dozens of systems``
6+
7+
* **Netflix** use it for their server architecture
8+
9+
* **Docker** uses Golang for a set of tools that deploys Linux containers
10+
11+
* **Uber** has their geo data and location components built on Golang
12+
13+
## Example of code written in Go compared to other languages
14+
15+
### Golang
16+
17+
```Golang
18+
package main
19+
20+
import "fmt"
21+
22+
func main() {
23+
fmt.Println("Hello, World")
24+
}
25+
```
26+
27+
### Python
28+
29+
```Python
30+
print "Hello world!"
31+
```
32+
33+
### Ruby
34+
35+
```Ruby
36+
puts "Hello world!"
37+
```
38+
39+
Just a simple example of `Hello World` type of code.

0 commit comments

Comments
 (0)