Difference between revisions of "Go"

From RogueBasin
Jump to navigation Jump to search
(Removes cat-v.org link as it hasn't been updated since 2012. Adds links to some useful pages at golang.org)
m (Updates version, platforms, influences, and licensing info)
Line 1: Line 1:
{{Programming language| name = Go
{{Programming language| name = Go
|company = Google
|company = Google
|influences = C, Python
|influences = C, Pascal, Python, Smalltalk
|updated = 2013-08-13 (1.1.2)
|updated = 2016-07-18 (1.6.3)
|status = Stable
|status = Stable
|licensing = Open Source (MIT License)
|licensing = Open Source (BSD-style)
|platforms = Linux, OS X, Windows, FreeBSD
|platforms = Linux, OS X, Windows, FreeBSD, Plan 9, Solaris
|site = http://golang.org/}}
|site = http://golang.org/}}



Revision as of 22:04, 20 July 2016

Go
Programming Language
Company Google
Influences C, Pascal, Python, Smalltalk
Updated 2016-07-18 (1.6.3)
Status Stable
Licensing Open Source (BSD-style)
Platforms Linux, OS X, Windows, FreeBSD, Plan 9, Solaris
Official site of Go


Go is a programming language announced by Google in November 2009. It is a native-code compiled, garbage-collected, concurrent language, born from the developers' frustration with developing concurrent server applications with C++. Version 1 of Go was released in March 2012, and should be a stable target for future applications.

Roguelike Issues

Go has several modern programming features, such as garbage collection and closures, which help when developing roguelikes. A major focus of the language is compile speed. Compared to compiling C++ code, Go compilation can be several orders of magnitude faster. It has a reasonably simple duck-typing-based interface system, which can lead to very clean reusable code. Currently, Go does not have any form of parametric polymorphism so programmers who are reliant on generics in their data model may have some trouble. The concurrent features such as channels and select are powerful, but often are not much needed in main roguelike logic, which is generally very sequential. It can however help when programming an user interface that runs asynchronously with the game logic.

Go has two compilers, the standalone gc one and a GCC front-end gccgo. The official GCC distribution has included the Go front end since version 4.6. The gc toolchain supports Linux, BSD, OS X and Windows on x86-32 or x86-64. Gccgo uses GCC as a backend, and can theoretically target any platform supported by GCC. With the help of app package, Go can even be used to target Android devices. There also is good FFI support for linking to external C libraries like SDL or Curses. Calling C code from Go is reasonably straightforward. An alternative to Curses is the execellent Termbox-Go library, which provides cross platform lightweight ncurses-like API written in pure Go.

Related Links