This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Languages and the fly likes Go language question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Go language question" Watch "Go language question" New topic
Author

Go language question

George Harley
Greenhorn

Joined: Sep 23, 2003
Posts: 6
Hi Mark,

Looks like a great book, I'll definitely be investing in a copy.

My question is this: do you think we will see a port of Go to the JVM anytime soon? Java obviously has substantial class library functionality that could prove valuable and time saving for developers in Go. Which makes me wonder why Go didn't originally emerge as a JVM language. Anyhow, I would be interested in your thoughts on this.

Thanks,
George
Mark Summerfield
author
Ranch Hand

Joined: Jun 20, 2012
Posts: 37

Hi George,

I would be surprised to see Go ported to the JVM. Go is designed to build fast (much faster than C++) and to run fast (at least as fast as C). Of course, Go isn't as fast as C yet, but it is early days. Right now people who want to access functionality that isn't in the Go standard library and that isn't available as a third party package (of which there are already a substantial number), are most likely to use cgo or some other solution for accessing libraries with C calling conventions from within Go programs.

The other thing to keep in mind is that the Go way of programming is rather different to the C++/Java/Python/etc. way in three key areas: (1) Go provides a very high-level concurrency model (as well as mid- and low-level concurrency primitives); (2) Go does object orientation is a radically different way that does not depend on (or even allow) inheritance; (3) Go functions and methods can return no value, a single value or a tuple of values, and so the Go approach to error handling is to make the last or only returned value an error value (or nil if no error occurred). So to use Go to best advantage means thinking in Go.


Mark Summerfield
"Programming in Go" - http://www.qtrac.eu/gobook.html
George Harley
Greenhorn

Joined: Sep 23, 2003
Posts: 6
Hi Mark,

Thanks for your answer. Now I'm really intrigued to find out more about Go. That's my summer vacation reading taken care of

George




 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Go language question
 
Similar Threads
ClassName.class
JVM & Javac
JVM Stuff
JVM-platform dependent or indepenedent
JVM language