News for hackers. Stuff that matters.
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.