>

Google is set to put a version of everything related to computers, it has its browser. office suite, loads of internet services, social networking site- orkut, launched its own operating system and now it has its own designed programming language called "Go".
Go is an open source project, distributed under a BSD-style license. This document explains how to check out the sources, build them on your own machine, and run them.

A simple program in go to print Hello World.

package main

import "fmt"

func main() {
fmt.Printf("Hello World \n")
}


Goole says Go is simple, fast, safe and free(Open Source).
Go compilers produce fast code fast. Typical builds take a fraction of a second yet the resulting programs run nearly as quickly as comparable C or C++ code.Go is type safe and memory safe. Go has pointers but no pointer arithmetic. For random access, use slices, which know their limits.Go promotes writing systems and servers as sets of lightweight communicating processes, called goroutines, with strong support from the language. Run thousands of goroutines if you want—and say good-bye to stack overflows.Go has fast builds, clean syntax, garbage collection, methods for any type, and run-time reflection. It feels like a dynamic language but has the speed and safety of a static language. It's a joy to use.
There are two distinct ways to experiment with Go. This document focuses on the gc Go compiler and tools (6g, 8g etc.). For information on how to use gccgo, a more traditional compiler using the GCC back end, see Setting up and using gccgo.

Google has made this site golang.org which has a lot of tutorials and programs for you to learn and practice.

Go is only available to be installed on Linux OS and it might take a while for for a windows compiler to be available soon. The instructions to install GO on an Ubuntu machine are given here.

The company says that Go is experimental, and that it combines the performance and security benefits associated with using a compiled language like C++ with the speed of a dynamic language like Python. Go’s official mascot is Gordon the gopher, seen here.

Here’s how Google describes Go in its blog post:

Go attempts to combine the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C++. In our experiments with Go to date, typical builds feel instantaneous; even large binaries compile in just a few seconds. And the compiled code runs close to the speed of C. Go is designed to let you move fast.

We’re hoping Go turns out to be a great language for systems programming with support for multi-processing and a fresh and lightweight take on object-oriented design, with some cool features like true closures and reflection.


Installing Go


Install Go[Top][Top]

The Go tool chain is written in C. To build it, you need to have GCC, the standard C libraries, the parser generator Bison, make and the text editor ed installed. On OS X, they can be installed as part of Xcode. On Linux,

$ sudo apt-get install bison gcc libc6-dev ed make

(or the equivalent on your Linux distribution).

To build the Go distribution, make sure $GOBIN (or $HOME/bin if $GOBIN is not set) is in your $PATH and then run

$ cd $GOROOT/src
$ ./all.bash

If all.bash goes well, it will finish by printing

--- cd ../test

Do tell us what you think of the article, please comment.
N known bugs; 0 unexpected bugs

where N is a number that varies from release to release.


For more help join a Golang Google group such as -

Golang nuts
GOlang Checkins

Search or just comment to know more !!

0 Comments:

Post a Comment