Learn Go: Hand-crafted Go exercises and examples
1–10 of 68 posts
Re: Learn Go: Hand-crafted Go exercises and examples
#2Re: Learn Go: Hand-crafted Go exercises and examples
#3I can never tell whether these titles are referring to the programming language or the board game.
Re: Learn Go: Hand-crafted Go exercises and examples
#4I 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?
Re: Learn Go: Hand-crafted Go exercises and examples
#5Re: Learn Go: Hand-crafted Go exercises and examples
#6Observation: 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 abo…
Re: Learn Go: Hand-crafted Go exercises and examples
#7Observation: 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 abo…
Your can't really do anything real without pointers in Go though because you won't be able to mutate states out of a function.
type Foo struct { ... }
func (f *Foo) Bar() { ... }
And go "Aha, that's an object and a method, I get it!" but when asked whether they should be using a pointer there or not, have no idea what that even entails.In other words, it's possible to neglect the details of pointers easily and have things generally work
Re: Learn Go: Hand-crafted Go exercises and examples
#8Earlier quoted context omitted.
Your can't really do anything real without pointers in Go though because you won't be able to mutate states out of a function.
That's definitely true, but I've often seen beginners just say: type Foo struct { ... } func (f *Foo) Bar() { ... } And go "Aha, that's an object and a method, I get it!" but when asked whether they should be using a pointer there or not, have no idea what that even entails. In other words, it's possible to neglect the details of pointers easily and have things generally work
Re: Learn Go: Hand-crafted Go exercises and examples
#9Re: Learn Go: Hand-crafted Go exercises and examples
#10Sure they're hand crafted but are they artisinal and free range and carbon neutral?