3 ms·
This is a great help given your experience. Can you elaborate further on why you think Go is best for API work? I do like that go has goroutines, a fast compi
by drudru11 9y ago
This is a great help given your experience.
Can you elaborate further on why you think Go is best for API work? I do like that go has goroutines, a fast
compiler, and a single statically linked binary.
- buro9 9y agoFewer abstractions really help with APIs. Go gets out of the way more, and for APIs that really makes a difference. An example might be handling the Accept header to give back multiple formats... many frameworks try and hide this from you, and so you have to fight to get something done. But Go exposes everything in a consistent and intuitive way, and there are mature packages for all of this stuff so it becomes trivially easy to work with. JSON work is simple, CSV work is simple, XML work is fairly easy, image work is simple. It's pretty beautiful as language/std package experiences go. It would need a more intuitive templating workflow for web stuff though (the "page.html inherits base.html and includes []block_*.html" story is a bit janky), and I've not yet found a decent answer for the l10n and i18n stuff, and whilst Hugo has a great template funcs library they've purposefully entangled it with their code, and so there is a lack of a core template func package to deliver a lot of things along the lines of Django templates. So Go is great for APIs, but weak for web.
- drudru11 9y agoThx Buro9