Initial Thoughts on the Go Programming Language
Yesterday, I began working through Tour of Go, an interactive guide for learning how to program in Go. My immediate goal is to learn enough to be able to submit algorithm Pull Requests to the Code-with-love project for Hacktoberfest 2020. My future goals will be implement a networking personal project, and to contribute to gobuster. This post highlights my initial thoughts and curiosities about Go.
Day 1 - Oct 2nd, 2020
- The syntax feels like a mix of C and Python, so I’m right at home.
- Having a variable’s type come after its name feels wrong…
Day 2 - Oct 3rd, 2020
- It’s neat that the only looping construct is the
forloop. Makes me rethink how I’ve been using
whileloops all these years in other languages.
- I didn’t see a practical need for deferring function calls until I read this blog post. Looks like they’re great for resource cleanup.
- The fact that
switchstatements only run the first correct case, and not each following case, is beautiful! No need to add
breakstatements like in C, C++, or Java.
Day 3 - Oct 5th, 2020
- Pointers are very similar to their C counterpart - save for pointer arithmetic, which should lead to less buggy code