Open main menu

CDOT Wiki β

Changes

Team Go

350 bytes added, 18:04, 18 December 2017
no edit summary
# [mailto:ssaqib1@myseneca.ca;lpnewell@myseneca.ca?subject=DPS921 eMail All]
== Go Programming Language (Golang) ==
Go is an open source programming language made by engineers at Google. The project started development in 2007 and was officially announced in 2009. Go had its first stable release on March 16, 2011. Built in the gc compiler Google Go is developed as an open source software. The language targets all three major platforms (Linux, OS X and windows) but can also run on mobile devices.
The Go language originated as an experiment by a few google engineers with the intention to take all the positive characteristics of existing languages and resolve the common criticism.
Go is meant to be statically typed scalable language like C++ or java while also being productive and readable; Go tries to avoid the repetition of too many mandatory keywords
== Channels ==
Channels are what Goroutines use to communicate with each other. They help Goroutines synchronize their execution. Channels can have directions that restrict them to just sending or receiving. Channels can have several parts to them: the type of element you can send through a channel, its capacity or buffer size and the direction of communication which is specified using a <- operator. Data can be sent from one end and received at the other, similar to how MPI threads communicate. A communication can be sent using '''t <- argument''' Or received using '''variable := <- t'''.
fmt.Println(x, y, x+y)
}
</source>
 
Output:
 
<source>
-5
17
12
</source>
== Sources ==
[[https://www.golang-book.com/books/intro/10|Concurrency] [https://tour.golang.org/concurrency/1 A Tour of Go] [https://blog.golang.org/concurrency-is-not-parallelism Concurrency is not Parallelism] [https://golang.org/pkg/math/rand/ The Go Programming Language] [http://guzalexander.com/2013/12/06/golang-channels-tutorial.html Golang Channels Tutorial]
32
edits