GO: Google Launches its own Programming Language

go-programming-language Google never stop doing new things and so it is so successful too. Innovation is the key in success of Google. Whether it is Google OS or Google Wave, it is always trying new and new things. Now one more feather in Google’s cap. Google just launched a programming language GO, an open-source development language that Google believes will combine performance with speed, and one that the company probably hopes will reshape the development and software industries in its favor. Go is based on the C programming family, one of the most widely used programming language trees in the world. However, the twist is that incorporates elements of Python (a preferred development language within Google) and the Pascal/Modula/Oberon family to make faster and more dynamic programs.

Why Did Google Make Its Own Language?

No major systems language has emerged in over a decade, but over that time the computing landscape has changed tremendously. There are several trends:
  • Computers are enormously quicker but software development is not faster.
  • Dependency management is a big part of software development today but the “header files” of languages in the C tradition are antithetical to clean dependency analysis—and fast compilation.
  • There is a growing rebellion against cumbersome type systems like those of Java and C++, pushing people towards dynamically typed languages such as Python and JavaScript.
  • Some fundamental concepts such as garbage collection and parallel computation are not well supported by popular systems languages.
  • The emergence of multicore computers has generated worry and confusion.
If you want to learn more, Google (as usual) has released a detailed, hour-long Google Tech Talk on the new language (embedded below). However, if you’re a developer and just want to get started, we suggest checking out the Go Tutorial and writing your first program.

Few features of GO language

  1. Speed: 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.
  2. Safe: Go is type safe and memory safe. Go has pointers but no pointer arithmetic. For random access, use slices, which know their limits.
  3. Concurrent: 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.
  4. Easy: 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.
  5. Open source: GO is now an open source programming language. Feel free to change/customize it for your need.

Hello World in GO

Following is the Hello World sample code in GO programming language: Hello World
package main import "fmt" func main() { fmt.Printf("Hello, World \n") }
Code language: Arduino (arduino)
Get our Articles via Email. Enter your email address.

You may also like...

13 Comments

  1. Giorgio Malagutti says:

    Google should make it clear if this language will be adopted only in the new OS, in Web Apps or in both.
    It is indeed a good thing that they built the new language from scratch because a correct management of concurrency at Google level (millions of transactions in parallel) can hardly be obtained using existing technology (Scala running on JVM, C# 4 running on .NET).
    Honestly I would have preferred to see the new language based on rock solid technology (Erlang), but of course they have the resources to create a new language and make it sufficiently robust and complete in, say, 18 months.

    • @Giorgio: I agree with you that Google does have resources to create a new language. More important is to make it robust and for that Google have their massive infrastructure that they can utilize. One things I want to see if how much does this language became user friendly/popular.

  2. Dean Schulze says:

    Giorgio – A systems level programming language that runs on the Erlang Virtual Machine? What O/S would the VM run on?

    GO is an alternative to C++ to do things like write an O/S, not a VM based language for writing enterprise applications.

  3. I don’t understand why everyone is so excited over this. The compile times are not that great. I can compile a C# app with similar characteristics in about the same time, if not less (depending on the computer).

    I don’t think this will go anywhere fast soon.

  4. Bryan Headley says:

    Are the compile times better than your standard C/C++ compiler, e.g., cl or gcc?

    Real question with this is, does it hit the sweet spot better than Digital Mars’ D?

  5. Priya says:

    @Nick I agree, The compile time doesnt really matter much. We would like to see some concrete stats on performance. May be its a good language for scientists.

    @Giorgio I dont think this anywhere remotely looks like a web dev language. What do you say?

  6. Giorgio Malagutti says:

    @Dean: Erlang runs on Windows and Linux. See how Linux can control a Vista PC: http://www.erlang.org/examples/win95demo/win95demo.html . What is interesting in Erlang is that it does not rely on the threading model offered by the OS and uses its own light threading system where variables cannot be reassigned (they are indeed constants). As a result you can afford to run millions of threads in parallel and since there are no shared variables (only shared constants) Erlang you eliminate the risk introduced by shared memory across threads, so I would say that Erlang favors robustness. Facebook uses Erlang for its chat service, handling more than 100 million active users. Erlang is being used also by Amazon, Yahoo, Motorola, T-Mobile, Ericsson http://stackoverflow.com/questions/1636455/where-is-erlang-used-and-why. So my answer is: Erlang takes control of what is needed to run fast, robust applications but for all the other services it can delegate to the existing OS it is running on.
    @ Priya: of course the language is not strictly meant for web development, but neither was Java or C# or Ruby. I assume that developers at Google will soon create frameworks like Django, Rails, Wicket, (…) to simplify writing web applications. The added value of Go in my opinion remains the fact that this language is designed from scratch to favor scalability. Scalability is interesting for desktop applications on multicore computers, but the place where scalability really makes the difference is with web applications where a startup can go from 100 users to a million users in 30 days. You need to be able to handle that, and with Go I expect it to be easier than with Java or C#, not to mention Python. So maybe Go is not better than C# or Java or Scala from the developers standpoint but probably it is from the standpoint of the guys running Google App Engine.

  7. Dean Schulze says:

    @Georgio: I know what Erlang is and what it is capable of. Why would you write a system programming language in a language that runs on a VM? If you wrote a new O/S with GO what would you run that new O/S on – an erl instance that is running on an underlying O/S?

    I didn’t see anything in GO about running on a VM. It produces native binaries.

  8. Giorgio Malagutti says:

    @Dean: running on a VM decouples you from the OS. If Go will run only on Chrome OS it will be probably only be adopted at Google. Of course you can write the OS in Go, but probably adopting Linux for the most part will save you a ton of work. Chrome OS will be out this week, soon all our questions will be answered.
    @Priya: when it comes to web development probably the frameworks counts more than the language: Rails, Django, Wicket, Struts, ASP.NET, MVC, … (too many to list) are all based on languages that were not strictly meant for web development.

  9. vitamin e says:

    Google’s Go Programming Language (golang.org) Go is a compiled, concurrent programming language. The syntax of Go is close to that of C except for the type declarations. The language supports include: garbage collection. The concurrency model of Go is modeled after Tony Hoare’s CSP. Missing features include: exception, type inheritance, overriding of methods. Unlike Java or C++, maps are built-in like strings. It is open source, fast , speedy, best for web scripting.

  10. Hassan Azhar says:

    Hi, need answer for one question please. Does this language support development of web application?

  11. Antguider says:

    Is GO will replace Java?

  12. Marcos says:

    For speed, does it mean it has low level constructs?

Leave a Reply

Your email address will not be published. Required fields are marked *