News for hackers. Stuff that matters.
Re:Web Development in Go by jgimenez on Monday April 10, 2017 @03:07PM (#14081566)
I think you have to use each tool for what it's for. Golang is useful for high performance stuff, yet it's easy enough to handle an HTTP request and parse JSON, for example.

Of course if you compare it with other options, you will find solutions that provide better expressiveness with less code (development speed), at expense of execution speed, type safety,...

Re:Web Development in Go by stock_toaster on Monday April 10, 2017 @05:00PM (#14082508)
I would say that while it is easy to parse json, it only remains easy if your json is straightforward and/or "well formed". If your json is... less well formed, you're going to have a much harder time parsing it with Go (and parsing it with good performance).
Re:Web Development in Go by inimino on Monday April 10, 2017 @09:54PM (#14084256)
What do you mean by "well formed"?
Re:Web Development in Go by stock_toaster on Monday April 10, 2017 @11:25PM (#14084592)
I mean one which doesn't have many similar, but variable, content structures, and/or which depending on the attributes of one of the elements.

I had to deal with large volumes of json (think log streams) that while they shared many top level attributes, also had had accreted many "optional" components with "types" that depended on the values of certain attributes (each with different nested elements too). While awkward to deal with in python (lots of `if x in y['thing']` checks), this was very cumbersome to deal with in Go. It required lots of reflection and ended up being comparatively slow (python json parsing is actually pretty zippy).

It just isn't one of Go's stronger suits in my opinion.

Re:Web Development in Go by inimino on Tuesday April 11, 2017 @02:12AM (#14085270)
OK. Interesting. One of the benefits of JSON is that it is ad-hoc extensible. Otherwise why not use an efficient binary format? When more strongly typed environments add JSON support they often screw this up, which is unfortunate.

Maybe an opportunity for someone to write another library to better support more idiomatic usage of JSON.

Re:Web Development in Go by stock_toaster on Tuesday April 11, 2017 @04:53PM (#14092334)
Yup. I agree with pretty much everything you said.