Earlier quoted context omitted.
He says it in the next sentence. "...but with GOPATH its opinions extended beyond my Go work and into the rest of my system. [...] I already have opinions about how to use my computer."
Not sure I agree with that statement. Yes Golang has an opinion on where it wants you to keep your go code but it dosen't effect the rest of your system, just your go work.
Go 1.11 got me to stop ignoring Go
31–40 of 79 posts
Re: Go 1.11 got me to stop ignoring Go
#32> I have major gripes with PEP-8, and if you ever see me using it I want you to shoot me in the face. That sounds extreme. I've never heard this before. Why?
IIRC, pep8 would have you write: def my_very_very_very_very_very_long_function_name(self, param1, param2):
def my_very_very_very_very_very_long_function_name(
self,
param1,
param2,
):
do_it() # function body here.Re: Go 1.11 got me to stop ignoring Go
#33Also, having helped a number of people now through their early days of the language it's also the one biggest thing by far that reliably confuses every single person. And I mean everyone — from first time programmers all the way up to people who've been in the industry for decades and are learning Go as their tenth language. Being forced to put files in certain places is incredibly non-intuitive because there's nothing else out there that requires it. I must have sent the Go documentation on workspaces [1] to two dozen different people at this point.
But on the other hand, once you've grasped the system and are using it, `GOPATH` is surprisingly not bad. It's always obvious where your dependencies are located and which versions are going to be used to build your project. Even better, it lets you very easily drop into those dependencies and add minor changes or debugging lines if you need to. This can be incredibly useful if you're trying to understand how one of them works or think that that you might have found a bug and trying to verify or patch it. A very powerful feature once you know about it.
The new Go modules seem good, and will be a huge improvement in lowering the barrier to entry for Go, but I'll miss the old `GOPATH` style of work at this point.
Re: Go 1.11 got me to stop ignoring Go
#34Re: Go 1.11 got me to stop ignoring Go
#35I whole heartedly agree with the author. While I disagree with GO's style guide and a ton of other choices - I don't mind following them since that's what the language requires. But it goes past that and wants me to organize everything my working directory just for it - it's absolutely crossing a line. While I didn't stop using Go because of GOPATH, it's one of those things that absolutely annoyed the crap out of me.…
That's funny, but since I started using Go, I now organize all projects under GOPATH, i.e. in `~/src/github.com/user/project`, no matter what language it is in. GOPATH and HOME are almost synonims now. I find it so much better experience than using tons of `~/Work`, `~/Projects`, `~/Code`, `~/SomeLang/` etc. as I used to have before.
Re: Go 1.11 got me to stop ignoring Go
#36With a constructor, I can force data to conform to what I need it to. I can ensure that certain fields are not nil, that they conform to a specific list of values, etc.
Because of a lack of a constructor in Go, I can't do that and I need to continuously validate the data, which is annoying and a source of bugs. It can be said that this can be accomplished with interfaces but that's adding a lot of complexity to something that should be a lot easier to handle, in my opinion.
Re: Go 1.11 got me to stop ignoring Go
#37I whole heartedly agree with the author. While I disagree with GO's style guide and a ton of other choices - I don't mind following them since that's what the language requires. But it goes past that and wants me to organize everything my working directory just for it - it's absolutely crossing a line. While I didn't stop using Go because of GOPATH, it's one of those things that absolutely annoyed the crap out of me.…
If you are investing time into learning a new language anyway, these things take very little time in comparison and definitely worth it.
Re: Go 1.11 got me to stop ignoring Go
#38My biggest problem with Go is the lack of a constructor. I don't feel that a struct type is good enough to enforce data integrity and as you have a more complex program, you need to know that the object you are being passed has data integrity. With a constructor, I can force data to conform to what I need it to. I can ensure that certain fields are not nil, that they conform to a specific list of values, etc. Because…
Re: Go 1.11 got me to stop ignoring Go
#39But how did Go solve the GOPATH problem? He didn't say.
FTA: "Go modules are great, and probably the single best module system I’ve used in any programming language. Go 1.11 took my biggest complaint and turned it into one of my biggest compliments."
Re: Go 1.11 got me to stop ignoring Go
#40Earlier quoted context omitted.
He says it in the next sentence. "...but with GOPATH its opinions extended beyond my Go work and into the rest of my system. [...] I already have opinions about how to use my computer."
Not sure I agree with that statement. Yes Golang has an opinion on where it wants you to keep your go code but it dosen't effect the rest of your system, just your go work.