Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

What is the best book to learn go?

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am following the book of Head First Go. But I found it difficult to follow. For instance to ask a user to enter a number(input) the code they show is :
 
Sheriff
Posts: 22080
113
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Comparing those two as-is is not fair, as the first code snippet also takes care of error handling.

The following are more fair comparisons:

1) Without error handling


2) With error handling

I both cases, the difference is in the imports only. That's because fmt.Scanf already specifies that it reads from os.Stdin. Setting up that part takes two imports, which are take care of by fmt.Scanf.
 
Fred Masen
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your answer Rob. But I think that I am going back to Java. Since the last year I have been trying to program in C++ Python and now Go but I just don't feel comfortable with all of them. Java might be old and verbose but at least I know what I am doing and can read easily the code. The only problem is the OOP of Java that's the reason each time I give up after an average of 6 months of study. And Go does not have GUI libraries built in which I really like when I program in Java. They all said that Go is here to replace Java but it has half of the tools that Java has to be a mature language. I think it's a good language but big companies do not seem to switch to it for some reasons..  It might be a niche language.  
 
Fred Masen
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Rob I am back with the go programming language  If you have some time, could you tell me where the bug is from my last program and post? I will appreciate. Thanks again.
 
Greenhorn
Posts: 8
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Fred Masen wrote:Hey Rob I am back with the go programming language  If you have some time, could you tell me where the bug is from my last program and post? I will appreciate. Thanks again.



Hi Fred,

I think the two languages (Go and Java) are very different, and they have different applications.
Java has over time evolved and had new features built in. It's a multi-purpose language with many different libraries and frameworks.
Go in comparison has much simpler language constructs, which IMO is a good thing as it's quite accessible to newcomers, and isn't bogged down with lots of syntactical baggage. It's also for situations where performance is a big issue as it's intended to be closer to the hardware. And of course Go does concurrency extremely well, and is without doubt the easiest language to manage multi-threading and thread synchronisation.

If you're concerned about the verbosity of your code, then a good IDE can help you a lot with auto-completion. I find that the support for Go in Visual Studio Code is excellent. It will even automatically add import statements, as Eclipse/Intellij does for Java.

 
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic