# stapelberg/gobook forked from miekg/gobook

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

78 lines (64 sloc) 3.424 kb
 \epi{"Is Go an object-oriented language? Yes and no."} {\textit{Frequently asked questions}\\ \textsc{GO AUTHORS}} \section*{Audience} \noindent{}This is an introduction to the Go language from Google. Its aim is to provide a guide to this new and innovative language. The intended audience of this book is people who are familiar with programming and know multiple programming languages, be it C\cite{c}, C++\cite{c++}, Perl \cite{perl}, Java \cite{java}, Erlang\cite{erlang}, Scala\cite{scala} or Haskell\cite{haskell}. This is \emph{not} a book which teaches you how to program, this is a book that just teaches you how to use Go. As with learning new things, probably the best way to do this is to discover it for yourself by creating your own programs. Each chapter therefor includes a number of exercises (and answers) to acquaint you with the language. An exercise is numbered as \textbf{Q$n$}, where $n$ is a number. After the exercise number another number in parentheses displays the difficulty of this particular assignment. This difficulty ranges from 0 to 9, where 0 is easy and 9 is difficult. Then a short name is given, for easier reference. For example: \begin{verse} \textbf{Q1}. (1) A map function \ldots \end{verse} introduces a question numbered \textbf{Q1} of a level 1 difficulty, concerning a \func{map()}-function. The answers are included after the exercises on a new page. The numbering and setup of the answers is identical to the exercises, except that an answer starts with \textbf{A$n$}, where the number $n$ corresponds with the number of the exercise. Some exercises don't have an answer, they are marked with an asterisks. \section*{Book layout} \begin{description} \item[Chapter \ref{chap:intro}: \titleref{chap:intro}] A short introduction and history of Go. It tells how to get the source code of Go itself. It assumes a Unix-like environment, although Go should fully usable on Windows. \item[Chapter \ref{chap:basics}: \titleref{chap:basics}] Tells about the basic types, variables and control structures available in the language. \item[Chapter \ref{chap:functions}: \titleref{chap:functions}] In the third chapter we look at functions, the basic building blocks of Go programs. \item[Chapter \ref{chap:packages}: \titleref{chap:packages}] In chapter \ref{chap:packages} we see that functions and data can be grouped together in packages. You will also see how to document and test your packages. \item[Chapter \ref{chap:beyond}: \titleref{chap:beyond}] After that we look at creating your own types in chapter \ref{chap:beyond}. It also looks at allocation in Go. \item[Chapter \ref{chap:interfaces}: \titleref{chap:interfaces}] Go does not support Object Orientation in the traditional sense. In Go the central concept is interfaces. \item[Chapter \ref{chap:channels}: \titleref{chap:channels}] With the \func{go} keyword functions can be started in separate routines (called goroutines). Communication with those goroutines is done via channels. \item[Chapter \ref{chap:communication}: \titleref{chap:communication}] In the last chapter we show how to interface with the rest of the world from within a Go program. How create files and read and wrote from and to them. We also briefly look into networking. \end{description} I hope you will enjoy this book and the language Go. \begin{flushright} Miek Gieben, 2011 -- \url{miek@miek.nl} \end{flushright}
Something went wrong with that request. Please try again.