News for hackers. Stuff that matters.
Re:Learning Go as a Node.js Developer by paulddraper on Thursday February 08, 2018 @10:50PM (#16337773)
> they don't need a dependency manager.

For not needing a dependency manager, Go sure has developed an amazing number of them!

https://github.com/golang/go/wiki/PackageManagementTools

https://github.com/avelino/awesome-go/blob/master/README.md#...

In fact, Go probably has the most package managers of any language I've ever seen.

Re:Learning Go as a Node.js Developer by gerred on Thursday February 08, 2018 @11:10PM (#16337841)
Perhaps everyone coming from other languages who can't imagine a world with a good standard library!
Re:Learning Go as a Node.js Developer by autarch on Friday February 09, 2018 @12:07AM (#16338027)
I wouldn't exactly call Go's standard library _good_. It's got a lot of stuff in it, which is nice, but the API design ranges from excellent (net/http) to "how much crack?!" (time.Format and .Parse) to not-quite-sufficient (various packages).

And of course, standard library APIs age with time. Perl and Python are good examples. Both ship with packages that were really good in their day, but have long since been superceded by community-created tools. But the core has to keep shipping the old thing for backwards compat and the maintainers are reluctant to add yet another package that does the same thing.

Dependencies have their downsides, but being able to assemble the best of what's out there rather than relying on the best of what was available at some point in the past has a lot of advantages too. Languages with good dependency management seem like the best possible option.

Go's refusal to embrace this is a huge pain point. Dep is a decent start, but without a community actually doing things like releases, changelogs, and all the other things that go into a solid ecosystem, it's a half measure at best.

Re:Learning Go as a Node.js Developer by yur83838 on Friday February 09, 2018 @12:23AM (#16338082)
> Go's refusal to embrace this is a huge pain point. Dep is a decent start, but without a community actually doing things like releases, changelogs, and all the other things that go into a solid ecosystem, it's a half measure at best.

Go has indeed embraced it and is working on `dep` the officially sanctioned dependency manager.

It's under the official golang github repository.

Re:Learning Go as a Node.js Developer by autarch on Friday February 09, 2018 @10:01AM (#16340601)
Yes, I know. But that doesn't help at all with the lack of releases, changelogs, etc. As I said, it's a decent start.
Re:Learning Go as a Node.js Developer by ta2384428 on Friday February 09, 2018 @10:28AM (#16340838)
https://github.com/golang/dep/releases

https://github.com/golang/dep/graphs/commit-activity

Agreed that it's a decent start, however I disagree with the lack of releases. If you look at the git history there is a lot of activity in it.

Re:Learning Go as a Node.js Developer by csmiller on Friday February 09, 2018 @12:26PM (#16342053)
I think he's saying the packages you install with dep don't adhere to things like semver.
Re:Learning Go as a Node.js Developer by seabrookmx on Thursday February 08, 2018 @11:49PM (#16337955)
Good is _really_ subjective. While its definitely better than JS/Node it has some warts. For example, I find the "time" builtin package to be pretty terrible. Specifically how it does formatting[0]. This method makes the format look like a magic string rather than being an obvious template like other languages would use.

I've found some legitimate bugs[1] in simple functions that don't give me a ton of confidence in it either.

Personally I find the standard libraries in the likes of Python and .NET Core much more comprehensive, intuitive, and reliable.

[0]: https://golang.org/pkg/time/#Time.Format [1]: https://github.com/golang/go/issues/15852

Re:Learning Go as a Node.js Developer by yur83838 on Friday February 09, 2018 @12:25AM (#16338089)
I often see time.Parse as a common complaint - but my code is much more readable when I can see what the date format looks like, rather than trying to interpret the cryptic syntax which differs from language to language.

It's sure not perfect, and it's impossible to please everyone but I think it was worth the experiment.

Re:Learning Go as a Node.js Developer by krinchan on Friday February 09, 2018 @12:26AM (#16338091)
Well that explains the fucked up nonsense of the time format function used in Packer Templates.
Re:Learning Go as a Node.js Developer by pjmlp on Friday February 09, 2018 @02:54AM (#16338638)
Go's standard library is pretty thin compared with Java and .NET, both with quite good dependency management tools.