5 ms·
Any good resources on learning go? Has anyone had any luck with the YT videos or courses way?
by ffpip 2y ago
Any good resources on learning go?
Has anyone had any luck with the YT videos or courses way?
- candiddevmike 2y agoIf you are familiar with programming, Tour of Go is a good overview of the language: https://go.dev/tour/ https://go.dev/tour/
- ffpip 2y agoThanks
- DoctorOW 2y agoI hope I don't sounds rude saying this but Go code is generally self evident. I personally got my Go knowledge from reading Go code on GitHub or the like. There's a certain beauty to Go code in that you can grasp what code does pretty easily, which definitely helps with learning.
- sapiogram 2y agoYou've clearly never opened Kubernetes' source code.
- wrs 2y agoGo is superficially readable, but be careful. It has some (in my experience) quite non-evident semantic aspects, such as interface nils and channel “edge cases” (which aren’t “edge” at all, you do have to handle them). The Timer thing they just fixed is an example of how the Go core team really expects you to read the manual. The good news is that the language and stdlib docs are concise and extremely clear. One of the really impressive things about Go.
- rowanseymour 2y agoI've been writing go for about 7 years and still occasionally footgun myself with nil interfaces. Drives me insane that they try so hard everywhere else to protect devs from themselves but that still exists.
- trevor-e 2y agoI wouldn't say that's true, I personally find Go code more confusing to read than the average language. For example: ``` func (r rect) area() int { return r.width r.height } ``` This syntax is strange to me despite being a simple example. I can tell that it's a function that takes in a rect pointer, is maybe named area() (but I'm now confused why this definition doesn't have an argument?), and returns an integer value. I've tried reading larger Go files and constantly run into syntax confusion like this and get exhausted. So sure, I understand the gist of this code, but this is more difficult to understand IMO than any Python, Ruby, Java, Swift, Rust, Gleam code I've read.
- maximus-decimus 2y agoMaybe if all you want to do is read code, but if you want to write it you need to know stuff like the fact there's no inheritance or generics, that public methods are define with capital letters and to parse json you need to use magic annotations.
- aadhavans 2y ago'Learning Go' by Jon Bodner [0] was the book I chose. A front-to-back reading got me up to speed with the language. [0]: https://www.oreilly.com/library/view/learning-go-2nd/9781098139285/ https://www.oreilly.com/library/view/learning-go-2nd/9781098...