Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Golang seems promising. I've been following this lang since its first release. It might take time to be a very good competitor to other programming languages.

One brilliant aspect of Java and .NET I see is their designers chose to create their own Virtual Machine so that other programming languages can run on it. Now I see Scala seems to be a very good competitor to Java. It can run on JVM and it has better syntax/concept and very promising chart progress on Tiobe.

To make this topic more specific, by Future, I only scope its scalable usage in various prominent industries as well as for campus and government.

As golang compile to machine code, my question is will golang support multiple languages? Like many languages can run on Java and .NET VM. I can't find other than these 2 environments example that don't have VM but directly compile to machine code like C/C++ or Go Lang.

I read from Golang blog that Google invested in golang that much, I wonder what strategy would Google take to boost golang penetration. I saw archive from Golang mailing list about golang roadmap, but no one answered that question. Or would golang make its hybrid into another form, just like how JavaScript can take off this far from its Lisp soul deep down beneath JavaScript, quoting from JS The Good Parts Book by Douglas Crockford:

JavaScript's functions are first class objects with (mostly) lexical scoping. JavaScript is the first lambda language to go mainstream. Deep down, JavaScript has more in common with Lisp and Scheme than with Java. It is Lisp in C's clothing. This makes JavaScript a remarkably powerful language.

Or probably like how FP languages have been inspiring so many other languages this far.

If golang really is promising (just like Scala) I would invest one or two of our programmers to learn golang. So far, I just support them to strengthen their concepts instead on OO(A)D, FP, and Theoritical CS to get their fundamental strong enough to face any language progress in the future.

share|improve this question

closed as not constructive by Mark Trapp Feb 14 '12 at 21:46

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

The name of the language is Go - please fix. –  reinierpost Aug 23 '11 at 22:23
Can you please pose an actual question? It is not at all clear to me what you want to know here. –  reinierpost Aug 23 '11 at 22:25
@reinierpost Go is commonly referred to as "golang", particularly because it's more searchable. The website is even golang.org It's more appropriate to refer to "Go" as "golang" due to the purpose of this site. –  weberc2 Jan 15 '13 at 20:43

4 Answers 4

up vote 14 down vote accepted

I think it's way too early to talk about multiple languages support in Go runtime. Couple of reasons:

  1. Go runtime is still in rough state. Default Plan9-derived compilers are quite inefficient but rapidly evolving with the language.
  2. GCC Go can't keep up with the pace of language evolution inside of 6g, 8g, etc.
  3. Garbage collection is still in its infancy stage - it's a joke compared to JVM and CLR GCs, although a work on a new incremental GC is ongoing. To put it into a perspective: the upcoming GC in Go will be essentially equivalent to the one we had back in Java 1.4 days, i.e. non-concurrent.
  4. UPDATE: Turned out it's implemented already: http://golang.org/doc/devel/roadmap.html

    Gcc Go doesn't have garbage collection at all.

  5. Although many Go capabilities like channels or array slices are quite attractive there are a number of weak language design choices: lack of exceptions and parametrized types (generics) come to mind.
  6. Lack of tooling: it's much more pleasant to develop a new language on top of JVM or CLR.
  7. There are quite a lot of other runtimes that might be more attractive for language designers. For example:
    • JavaScript virtual machines: Google V8, JagerMonkey are very fast;
    • LuaJit: LuaJit author is very favorable to people who build languages on top of it;
    • Erlang VM: for cutting-edge concurrency;
    • LLVM and Rubinius - Rubinius team is actively working to facilitate building new languages on top of their runtime;
    • GHC and OCaml VM: ML-based languages are quite fast and very suitable for building parsers, state machines and translators.

share|improve this answer
According to a (bad) anonymous edit Gcc Go does have garbage collection. –  ChrisF Jul 7 '11 at 10:37
ChrisF, yes, my bet - Garbage Collection for gccgo was implemented as stated on their roadmap page: golang.org/doc/devel/roadmap.html I'm very happy to hear that! –  Andrew Андрей Листочкин Jul 7 '11 at 11:19
In fact, someone is working on a Go implementation for the Rubinius VM ;-) –  Jörg W Mittag Jul 7 '11 at 18:55
@Jörg Wow, that's pretty cool! –  Andrew Андрей Листочкин Jul 8 '11 at 8:52
@Andrew: Unfortunately, I cannot find it right now. I know that it exists, but all I have been able to find are an implementation of Bash(!!!), three Smalltalk implementations, one Lua, two Io, two Python, two JavaScript, one CoffeeScript and about a gazillion Brainfuck implementations for the Rubinius VM. Oh, and a JVM(!!!). BTW: in the other direction, there is RubyGoLightly and the GoLightly VM. –  Jörg W Mittag Jul 8 '11 at 12:08

I'm not certain that I understand your question, but I don't think Go is comparable to JVM or .NET. Go is a language, not a platform, and while it does have some runtime support code for goroutines, channels, memory management, etc, these exist solely to support Go and aren't really exposed, so it'd be difficult and probably inadvisable to use them directly for another language.

Mind you, Go is interoperable with C with cgo, and people have embedded interpreters for various other languages, so using Go doesn't mean everything must be in Go, but I wouldn't bank on Go supporting other languages (at least, for the possible ways that I can think of to interpret that) in the foreseeable future.

If you're asking about whether Go will ever run on VMs and not just as machine code.. probably. JVM, CLR, and Erlang's VM are all not particularly good matches for how Go works, so while one could make Go run on them, it'd probably be very slow and interop would be awkward. It seems pretty likely to me, though, that we'll see some LLVM-based Go implementations coming around soon. Also, since I've seen LLVM->Javascript converters, it's possible that folks will be compiling Go to Javascript in the near future.

share|improve this answer

You're looking at this the wrong way.

In Java, C++, C#, and other common mainstream languages, the syntax is complicated and it is difficult to write a complete compiler. In general, there are really only a handful of complete compiler toolchains, each of which is incompatible or different from others in subtle ways. This means that aspiring language creators can't keep the syntax the same and change the implementation- say, to make a native compiler for Java- because it would be a massive development effort that existing code might not even work with. Instead, they write languages with a different syntax that use the same underlying implementation, with Scala being an example. They innovate on the path of least resistance.

With go, the syntax is lightweight and simple to the point that a complete parser exists within the language itself. This means that rather than innovate by writing new syntaxes for an existing framework, language developers are more likely to write new frameworks for an existing syntax. A preliminary one exists for .NET already. I wouldn't be surprised to see a compiler that generates JavaScript from go code.

tl;dr: It's unlikely, at least at this point, that go's runtime will be used by other languages, but it's syntax may well find itself on many different runtimes.

Edit: There is also a version of go that compiles to the jvm. See http://code.google.com/p/jgo/.

share|improve this answer

You can use Go libraries that execute codes of other languages right now (like Lua, Javascript, Python and more at the Dashboard).

Few reasons Go will become mainstream:

  • Go is sponsored by Google
  • Some people from Bell Labs (some of those who created C and Unix) are Go developers.
  • You write less code, you need nothing to execute it (pure machine code).
share|improve this answer
"When Google invests in something, it must be good." - Um, how about Wave? Buzz? Video? Notebook? Lively? Dodgeball? –  Josh K Jul 8 '11 at 19:55
@Josh K: I meant that it must be good, not necessarily successful. Anyway it doesn't make many sense anyway, so I removed it =] –  Zippoxer Jul 10 '11 at 13:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.