Channels ▼
RSS

Open Source

Go: A New Programming Language from Google



Google has launched Go, a new systems programming language born with concurrency, simplicity, and performance in mind.

Go is open source and its syntax is similar to C, C++ and Python. It uses an expressive language with pointer but no pointer arithmetic. It is type safe and memory safe. However, one of its main goals is to offer the speed and safety of a static language but with the advantages offered by modern dynamic languages. Go also offers methods for any type, closures and run-time reflection. The syntax is pretty clean and it is garbage collected. It is intended to compete with C and C++ as a systems programming language.

What about multicore programming with Go? It promotes lightweight concurrency allowing developers to create sets of lightweight communicating processes. Go calls them goroutines. This way, you can run many concurrent goroutines and you don't need to worry about stack overflows. Go promotes sharing memory by communicating. Goroutines aren't threads, they are functions running in parallel with other goroutines in the same address space. It is very easy to launch parallel functions using the goroutines. This is one of the most interesting features offered by the language. It really simplifies concurrency for systems programming.

Go's key features related to concurrency are:

  • Channels.
  • Channels of channels.
  • Goroutines.
  • Leaky buffers.
  • Share by communicating approach.

These features deserve new posts explaining them with more detail. Stay tuned because I'll be adding new posts about Go soon.

The idea behind Go is to offer a fast compiler to produce fast code. So far, it offers two compilers:

  • Gccgo (GCC is in the back).
  • 8g (x86-32) and 6g (x86-64).

If you want to test this new programming language, your starting point is Go's main page.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video