Following my post, I decided to take on an action and learn Go.
Should I learn Go?
Ido Shamun ใป Sep ...
For further actions, you may consider blocking this person and/or reporting abuse
All languages are imperative now days, I think you wanted to say Procedural Programming?
I personally love procedural programming, I think Go is the perfect mix between a FP and OOP style. You have a bit of everything to solve problems "good enough" in small/medium projects.
"...Go is the perfect mix between a FP and OOP style."
You're killin' me, Smalls!
I have no idea what you said, but I will put the accent on "I", as in "for me" :))
I can apply patterns from both world, but of course, does not excel at either of them.
PP is a type of imperative programming. I love FP which is obviously a type of declarative programming.
The code looks much more elegant and clean, sometimes it can be harder to read though.
I love this writeup - really succinct and accurate, IMO (I've been writing Go almost exclusively for 5+ years)
I felt like the
GOPATH
and the dependency management tools were always a thorn in my side. Recently, they started turning me off of Go TBH, but 1.11 fixed both (others have more detail). And shameless plug: I'm working on a server for Go modules so that you don't have to pull code directly from GitHub if you don't want to - because that's caused problems in the past too.github.com/gomods/athens
Do you mean having them as global variables? If so, please dont do this.
Use dependency injection for explicit documentation of what your code is using and where.
For a small scale service I find it cumbersome but you are right DI is the better way
Being new to golang, my biggest concern is, how do I organize/structure my code. Flat structure for simple application I am currently building seems reasonable, but it still seems weird for me.
I can totally relate to this one! It annoys me as well, not sure how to structure the project
I really like the approach suggested in this article: medium.com/@benbjohnson/standard-p..., but don't want to overcomplicate the whole thing.
I hated this, fortunately with go modules is mostly solved
Go get(s) modules
rhymes
I am using Go modules and it works good so far.
Unfortunately I haven't heard about go modules, I'll give it a go
ahha don't worry, they are a super recent thing. They have been added in Go 1.11
2/4 of your cons are fixed with Go 1.11 which was released late August.
The GOPATH thing and dependency management.
So simple you don't even have to think about it.
That's great to hear!
I am sure the language will evolve and become much better as long as a tech giant as Google backs it
Your 'Cons' are my thoughts exactly! The requirement for GOPATH still confused me as to why it is that way. As for the error handling, that should get better with the recent release.