The experience finishing the first feature in golang
As part of my work, I needed to implement my first feature in golang. My experience before this was doing a pull request, where only the if condition needed to be added. And now years of reading the golang code, trying to understand why some things worked as they did.
When I first started to work on it, it was annoying, that a lot of things were missing. I would search for things like list comprehension in golang or filter in golang, and I would find out, that these things do not exist. So I would need to find a different way to do it.
A lot of explanation would also be more confusing, that I needed at the time. So lists can be lists and slices? I still don't really know, what interference is? And many, many more.
I also spend way too long time figuring out, how to map one type to another. Golang would not even run, if I did not get all the types right. Since I did not yet figured out, how to use debug, and was using the print statements for debugging, this was very annoying. Tutorials might me beginner friendly - I did not try them. But searching for how to do something is certainly not beginner friendly.
But the thing, that bother me the most on the beginning is the stopping in the witting phase. Python, JavaScript, HTML and CSS do not require you to have 100% valid code before running. Are there variables, that are never used? All of them will allow it, but the golang would not. So each time I tested something, I needed to comment way to much code, and then uncomment it. Being reminded of this each time... why? I did not get it and I think for testing something, I would still prefer a language, that does not do that.
But when I was towards the end, and I needed to refactor the code, this suddenly become really helpful. I am much more used to think in the HTTP requests. But it became clear later, that I will not be able to use HTTP requests, but will need to use the inner structures, that these HTTP requests would call. Since I had no idea how to deal with authentication.
And the refactoring of this part went extra fast. If not for my currently broken database migrations, I would most likely not even needed to run the code for testing. I think that as soon as I had the code that run, it would work.
Considering this point, I can sort of understand, why people would pick it for the production. In the code-base, any long term project will include quite some re-witting - and the easier it is done the better. But I do not think I will be using it for nay of my personal projects just yet.