The route to the beginning

Most of the code I have ever written has been in JavaScript. I’ve learned so much through using JS as my main programming language. It is where I got my start.

The issues with JavaScript continue to creep up. commonJS or module syntax. I’ve noticed that there have been so many different patterns to keep up with the more I exposure I received into the language. CommonJS or ES6 modules projects operate in different ways. The numerous configuration files. Non-standard ways of doing things.

Yes there is freedom in all of that, but to me it is a lot of noise. I began to seek out another language to learn, another language that would alleviate me of all the noise in the JS (including TypeScript) ecosystem.

In the past I tried Rust. Learning the basics of the language did not prove too difficult to me, but I found a lot of friction with traits and implementing them onto structs. My learning pretty much halted from that point. I wanted to write a node.js server of mine in Rust. I wasn’t able to get the database struct and return types correct for PUT/PATCH requests that would be updating optionally supplied fields. I remember trying a solution using Option<> but that was another area I found difficulty with in Rust.

C++ is well known and I tried it during college. I gave modern C++ another shot, and then I quickly found out that modern C++ using the import syntax is not widely supported by compilers! The feature isn’t reliable. A book on learning C++ used the import syntax and I couldn’t get past that code. I wasn’t able to read and code along, the language compiler fragmentation is so bad that I wasn’t able to compile code using import syntax on a macOS laptop. I found this unacceptable. I gave C++ some grace and followed the classic #include header.h syntax and found the language so overly verbose with features upon features, I found too much to be going on with C++ to be made my primary language after JS/Node.js.

Enter C. I studied a bit of C code and got an appreciation for the printf function. The simplicity and freedom to code in C truly is elegant, however the language has its downfalls as well, as far as I am concerned. Resources promote the K&R book, which teaches unsafe C code right off the bat. I found that after learning one set of unsafe C functions, that actual safe functions were added or existed alongside the unsafe functions. Naturally I am only interested in using the safe functions, no matter how anal I can be about passing ever bit of information to a function to ensure it operates exactly how I expect it to; I was not interested. I was interested in using only the safe functions that I would have like to know existed from the start. Fragmentation in C versioning was annoying to me as well, and I noticed warnings online about large C projects being hard to manage. I put my journey of working with C code on hold.

Python never truly interested me. I know it to be a slow language from voices online, however it also gets the APIs first for simple to use packages, like AI prompting. I decided to give it a shot. The syntax was not for me and I gave it a good go. I did not enjoy writing Python code. I was also trying to escape JS and TS where types on a variable are not concrete. I want typing to be built into the language.

Language after language, I tried them all that interested most at the time.

It was then time to try Go. I was familiar with the language’s rep for favoring simplicity and having a large standard library, one that is “batteries included.” That was a pet-peeve of mine with other languages needing packages outside of the standard library to write programs. The idea of using only the Go standard library to write programs with 0 external dependencies appealed (and still does) to me.

My initial research into Go was enough for me to take the plunge and go all in on the language. I began to feel an excitement around learning Go and having more of a program’s underlying structure exposed to me, by nature of writing Go. Go was designed to solve the maintainability issue of large C projects while being OOP-like with its types and Method functions on those types. I like the safety that Go encourages as well. The code is slower to write, but best practices encourage the handling of errors in programs at the source. It simplifies error handling so much in my eyes. The suite of features included with Go is also magnificent. Built-in test runner, build system, formatter, and the list goes on. Go is jam-packed with tooling for an incredible Developer Experience.

I am having a fantastic time using the language to solve my programming tasks. The use of Go should continue to spread in the modern age!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *