Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Go language question

 
George Harley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
George Harley
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic