42 points · by bsg75 · 12y ago · 58 comments
- Lack of Generics. I know this has been beaten to death but after using a dynamic typed language all this time, it is even more painful.
- Weird dependency management. No way to lock dependency versions, even if I fork something and depend on it, nested dependencies can fuck up at some point. We need something like NPM to manage our dependencies in a sane way. Importing from live git paths seems like the worst possible solution to this. And there seems to be no widely accepted 3rd party package manager.
- Google... At some point, I'd expect the compiler to require a Google+ account to enable optimizations. /s
Heck, I used to do that in C all the time anyway.
However... The dependency management is my pet peeve #1. I see no problem pulling dependencies from external repositories and building them locally. That practice spans back to at least BSD ports. What I dislike is the fact that I can't specify the version or commit I want to depend on.
I find that the current implementation for "go get" assumes everyone is either a hard-core hacker, always living on the edge (and sometime pushing it) - or they have a full-fledged internal repository infrastructure in place to deal with all the mirroring and continuous integration needs. Go decides internally which revision to checkout and build, using a priority list of hardcoded tag/branch names. If those are not available, it defaults to master:HEAD, /trunk or whatever equal alternative is supported by the underlying SCM. You can not specify "I want to use _this_ version, period" which is a crying shame.
I understand that internally Google doesn't use go get at all. They have their own mirrored repos for everything they need during their builds. Understandable. But ignoring the well-established practice of user-specified upstream component versions is just rude. It forces some "makes sense only in very large organisation" type of practices down the developers' throats.
Not a very encouraging notion, considering the issue is quite trivial, solved in 200 other languages, and it's 2014 already.
That goes on to my pile of things to try out.
Then don't do it. Check your dependencies into your repositories and update import paths.
This is the problem that Maven, RubyGems, etc. have fixed for so very long that I find it really hard to take Go seriously when this is floated as a solution. And that seems to be a regular occurrence in Go: the willing championing of bad but "simple" solutions (error codes as far as the eye can see!) under the mistaken assumption that things are complex just to be complex rather than that they're complex because they solve a bigger problem.
I can imagine a script that's just a few lines that downloads go-gettable dependencies and updates import paths. You run it at exactly the time you want to update.
> have fixed for so very long that I find it really hard to take Go seriously when this is floated as a solution
By a large margin, I spend the least amount of time configuring my Go packages for release than for any other language.
Need a mature build tool? Then use one and stop complaining.
http://support.thoughtworks.com/entries/20074167-Using-Maven...
Copy the new version into the repository, run the import rewriting script and check it in.
> Why is it better to spread the responsibility for updates over all Go authors instead of to the authors of the libraries in question?
Because you want to have full control over your dependencies. What if the author introduces a breaking change or removes the repository from the internet? Do you want to risk your business by being at the mercy of someone else's repository?
A single tool, "go get", pulls code directly from 3rd parties and puts it in $GOPATH. If you're uncomfortable or frustrated using "go get" there are a number of 3rd party options.
You don't say.
1. http://commandcenter.blogspot.com/2011/12/esmereldas-imagina...
1. Type safety 2. Convenience
(1) is certainly no worse than a dynamic language, where you don't have type-safety anywhere. (2) doesn't seem that bad to me. You'll write code like this:
x := customStack.Pop().(SaysHello) // error here if x isn't a member of the interface SaysHello
x.Hello()
As opposed to a dynamic language: x = customStack.Pop()
x.Hello() // error here if x doesn't define hello
Disclaimer: I've just poked at Go a little bit. I'm thinking about trying it out as a replacement for some Python code I have.Further disclaimer: As a C++ programmer back in the day I used to make a lot of fun of Java for not having generics (it's had them for a long time now, of course). Lately I've been doing Objective-C (where the situation is like Go, but worse -- no generics nor interfaces; it's all just dynamic), and I've been surprised at how not having generics is Not As Bad As You Might Think. It's basically equivalent to a 'dynamic' language.
While I think it's good to know how to write containers, and how they work, how frequently do you really need to write a custom container? What's wrong with the built in ones (provided they exist)?
Custom containers: Well, it's definitely true that you can get pretty far with just arrays and hash tables -- which Go special-cases! -- but you're probably gunna want something fancier eventually...
(i.e. if you change your major version, start a new branch. if you change your minor version, start a new branch but continue to update the old one also. Actually, without tool support, that's going to get painful, but the idea is sound and requires only local tooling.)
Just copy the dependencies into your repo and adjust the import paths. If necessary, flatten the dependencies of dependencies.
Ironic domain name.
This Chrome extension adds a right-click menu item "make readable" that fixes the font on pages like this. https://chrome.google.com/webstore/detail/text-fix/ofafkoecd...
I forgot how snappy the internet is when you keep it simple.
https://addons.mozilla.org/en-US/firefox/addon/clearly/
Indispensable for coercing over-exuberant webpages into readability.
edit: I found the fulltext archived elsewhere on fullhn. This honestly just a listing of Go features and there's no "confession" to speak of anywhere. It seems like the OP would like Erlang.
I'm not sure if there were any confessions. It was basically a "hey, you should try out Go. Maybe. If you want. I like it…" kind of post.
There are no objects in Go, given that Go is not an object-oriented language... oops! (pun intended)
In OOP languages the objects contain the subroutines (methods) hence orienting the programming towards the objects.
Do the more pedantically inclined have a better definition?