|
|
|
|
|
by deferpanic
4087 days ago
|
|
I'd just like to point out that most of our customers have webapps written in go - not just JSON apis so this argument that go is not for webapps is at best incorrect. I talk to gophers around the world everyday that are using it just for that. They much rather hack on a webserver that they can use in 15 LOC from stdlib than some beefy JVM framework. From the conversations I've had I strongly believe most webapps are going to be written in go in the coming years. |
|
* Good SQL persistence abstractions aren't there yet, so realistic SQL-backed applications depend on writing tons of raw SQL and (worse) parsing results. Like a savage.
* Golang's built-in templating is good for self-contained full templates but not great for hierarchies of templates and partials.
* Golang's net/http library is so good that it's a gravity well for other request handling abstractions, so that sessions, CSRF tokens, and access control either have to be built directly on Golang's equivalent of Rack, or inevitably get put into libraries that conceal too much of net/http.
"Going with the flow" and writing idiomatic Golang code feels a lot like writing those Sinatra apps where you get 1/3rd of the way through and regret not just using Rails.
You can totally write a good web app in Golang, especially if you're doing minimal serverside HTML generation and leaning on something like React or Angular or Ember instead. But it's not what Golang is best at.
Meanwhile, Scala is both a language designed in part for serverside web apps and built on the JVM.
If you're writing a web application, where your functionality is exposed by a port 443 that Firefox connects to directly and asks for "/" from, I'd prefer Scala to Golang.
Reasonable people can disagree or object to any of this, but I'm not going to waste time sugarcoating.