Google’s New Programming Language: Go

Posted by Mani On January - 22 - 2010

go logo black Googles New Programming Language: GoJust few months back (November 09) Google officially released its own programming  language named  ”GO“. Ken Thompson (of UNIX fame) is one of its designers, and it has the support of Google,  so the language got much attention on the Internet.

It is much like C and a system programming language with C like syntax and execution of program is fast like in C. It safe to use  as it has type safety, garbage collection, etc. GO is concurrent language and more interestingly it is an open source’s language with some cool features. Have a look at these features, i am sure GOwill be the language to watch out for.

Features.-

The first question comes up in everyone’s mind is – How does it look like?

As mentioned above, it is much like the C so the coding very much resembles the coding in C. Every code is preceded by some key words like  - type , func , var or const which tells you what is being declared. Every type declaration is quite cleaned up a lot and doesn’t give you the type-declaration garbage like C. In every declaration name comes first and then it is followed by its type.

For example  if i want declare an integer ‘n’, it will be declared like this way:

[php]
n int ;
[/php]

Did you notice the semicolon in the end? Yes, just like C statements end with semicolons. Now lets have a look on function declaration :

[php]
func Factorial(n int) (result int) {

if n == 0 {

result = 1;

} else {

result = n * Factorial(n – 1);

}

return;

}
[/php]

We are not going into much details but i think the above code might give you a rough idea about a function declaration and definition. Having a closer look at it again, here is something different from C’s flavour, “you can declare the  return value as a variable which will be returned by the function in the header part of function”. Here result is the variable to be returned. Quite interesting for the coders!

Another interesting thing is that you can also have your functions with  many or multiple return values.This is just a part of it. Guess how interesting the it would be to code in GO!

For more information follow these links -

The official site is http://golang.org

Installation issues can be found here.

You can read tutorials from official site here.

Enjoy GO !

Suggested reading:
GIT Installation on Linux and Basic Usage
In our last section we figured out what Revision Control System, GIT is meant for. In this tutorial we will try to learn how to have GIT installed in your system ...
READ MORE
GIT – Free & Open Source Revision Control System
GIT is used as a Revision Control System over distributed environment. It was initially developed by Linus Torvalds for maintaining the Linux Kernel project. What is a Revision Control System? Also known ...
READ MORE
Google Brings Open Source Development Contest for Kids with Google Code-in
Google has announced a completely new contest for the kids in the age group of 13-18 years; bringing Open Source development to the pre-university students. The idea behind the contest ...
READ MORE
code jam problems list
What is Code Jam ? Google Code Jam is a yearly coding competition which is organised and administered by google. It is a coding competition for all professional and student ...
READ MORE
GIT Installation on Linux and Basic Usage
GIT – Free & Open Source Revision Control
Google Brings Open Source Development Contest for Kids
How to: Participate in Google Code Jam

Article by

Mani is a coder passionate about working in open-source projects. You can follow him on Twitter or Join him on Facebook

Mani has written 30 articles for us at TechTickle.

Leave a Reply

About Me

Welcome to TechTickle! A blog that features Latest technology news, Linux tutorials, Updates related to Social Media, Website & Software reviews and Open Source. We are a group of ordinary individuals, with an extra ordinary quality of sharing our passion and, reaching out to the people in nook and corner. Read more About TechTickle!

Twitter

    Subscribe to E-mail Updates: