from Hacker News

Learn Go: Hand-crafted Go exercises and examples

by inancgumus on 5/16/20, 7:25 PM with 66 comments

  • by slimsag on 5/16/20, 8:08 PM

    Observation: I see that you do 26 exercises before doing anything with pointers.

    I often wonder if one of the reasons Go is more "simple" or approachable to some is because you can, to a large extent, ignore pointers and interfaces and "just write that weird little * or & in some places" and get away with it. Whereas, I believe in other languages, this is much less possible (e.g. in Java or Rust you need to learn about less "just logic" traits of the language earlier on (class inheritance, generics or Options, borrow checking, etc.)

    I'm not saying the above is a good thing, but I often wonder if there aren't ways to make this more of an incremental learning curve in other languages in a similar way that you can largely ignore pointers in Go for a long time and be productive without understanding them. What would a similar incremental learning curve for generics be?

  • by gotoeleven on 5/16/20, 8:10 PM

    Sure they're hand crafted but are they artisinal and free range and carbon neutral?
  • by ganstyles on 5/16/20, 9:33 PM

    This looks pretty cool. When I was learning Go a long time ago, I used a site called Gophercises and found it really helped me understand the language better.
  • by efiecho on 5/17/20, 6:57 AM

    I have not yet been able to find a simple "Hello World" example of starting a new project with Go modules instead of $GOPATH.
  • by gotzmann on 5/17/20, 12:53 PM

    I've compiled a few interesting quizzes about Go's slices: https://medium.com/@gotzmann/so-you-think-you-know-go-c5164b...
  • by notokay on 5/17/20, 11:34 AM

    Why snaps? Is apt-get not good for you already? What's wrong with it?
  • by crunchbang123 on 5/17/20, 5:12 AM

    If you're interested in interactive language learning exercises, then try codewars(https://www.codewars.com)
  • by mpoteat on 5/16/20, 7:54 PM

    I can never tell whether these titles are referring to the programming language or the board game.
  • by edem on 5/16/20, 8:33 PM

    This doesn't ask the most important question: why would I learn Go at all?
  • by alexandrerond on 5/17/20, 1:20 AM

    This is great, but I think it should be written in Rust.

    It will then run way faster and be completely bug free.