Simplicity is Contagious

submited by
Style Pass
2024-05-13 05:00:03

I have been programming Go continuously for a long time, I only say “long time” for a thing when I start developing opinions about it, and I’m starting to develop very strong opinions about Go (the programming language).

Go is a very simple language but I think that many don’t understand the necessity of this simplicity in this programming world. The reason I’m writing this is because I miss some of the very simple things that Go provides us and we take it for granted.

Despite being a garbage collected language (which generally aims for developer’s productivity by hiding intrinsics), the explicit mentioning of references gives us one more flexibility to make some variables as pointers, which in turn can save memory. It is not remembering which types are “pass by value” and which are “pass-by-reference”, it is just us saying to the compiler that I want this to be a reference with * prefix operator.

I do have some concerns on zero values used in configuration space, but it does make code look lot cleaner when used it properly. Although the concept of zero values is quite simple, where built-in types are initialized with their default values:

Leave a Comment