News for hackers. Stuff that matters.
Re:Building Web Apps in Go by nkozyra on Sunday March 27, 2016 @10:46PM (#11372435)
At least for the Web, Go will match the conciseness of Python with the performance (almost) of Java. It takes a lot of cajoling to make Python a great backend for the Web.

Since confounding downvotes, a tldr: closer to Python than Java.

Re:Building Web Apps in Go by TheSwordsman on Sunday March 27, 2016 @10:48PM (#11372443)
I'm not sure I fully agree it'll match the conciseness of Python. Go will be more verbose, for sure.

If you start having to Marshal/Unmarshal JSON, it'll get pretty annoying pretty quick depending on the JSON format.

Re:Building Web Apps in Go by nkozyra on Sunday March 27, 2016 @10:50PM (#11372452)
Go's JSON marshaling can be heavy if you tie it to a strict struct versus, say, an interface. You can make it light, but yes, sometimes some reflection is necessary to utilize that data.

For most web applications, JSON in or out is of a known schema, so this generally impacts other servers moreso than web applications.

Re:Building Web Apps in Go by TheSwordsman on Sunday March 27, 2016 @10:55PM (#11372468)
Oh absolutely.

I guess I was trying to call out that, depending on the API you are supporting, it can get hairy. If you are designing it from scratch, when starting the Go project, you can structure your JSON in a way that's easy to work with.

If you're coming in to something that was easy to use in a language like Python, it may not be that easy in Go.

Re:Building Web Apps in Go by nkozyra on Sunday March 27, 2016 @11:02PM (#11372495)
I guess my point is it will be more concise than Java, certainly closer to Python.
Re:Building Web Apps in Go by stephenboyd on Sunday March 27, 2016 @11:05PM (#11372503)
And if you have to marshal/unmarshal XML, it gets worse. Go's XML library is buggy and its documentation recommends using JSON instead.
Re:Building Web Apps in Go by millstone on Sunday March 27, 2016 @11:46PM (#11372618)
Go is not concise, it is more verbose even than C++. Compare Python's list comprehensions to Go's for loops, or Python's sort() vs implementing Go's Sort interface, or Python's ternary operator vs Go's five-line if-else statement, or `if err != nil...`