Live data from Hacker News

Ask HN: Anyone here switch to Go for building (REST) APIs?

news.ycombinator.com

1–10 of 51 posts

Re: Ask HN: Anyone here switch to Go for building (REST) APIs?

#5

Yup, Go is great. It's simple and fast. There are great libraries and it's a lot of fun.

Yes there is something about it that is actually fun... there's a productivity sweet spot, it makes sense and you know it's probably going to work first time (at least compared to many other languages) - so you spend more time expressing ideas and solving problems.

Re: Ask HN: Anyone here switch to Go for building (REST) APIs?

#7
I went from Python to Go to Rust. Go plays up this fantasy of types helping you catch bugs, buts it’s really C with lipstick. There’s no enums, no exhaustive matching of any kinds, there’s null to worry about everywhere, and every utility function has to be painfully written out for each type (maybe that’s starting to change now with Go having basic support for generics).

Re: Ask HN: Anyone here switch to Go for building (REST) APIs?

#10
First of, just like the term "hacker" became popularized by the media and turned into the meaning of someone who cracks computers and software, so has HTTP based APIs been popularized and turned into REST applications, but this is wrong. A HTTP based API cannot, by its very nature, ever be REST.

Now that's out of the way, yes. We use Go for both API and web development, actually full stack WITHOUT any JavaScript. We have written a custom error handler that deals with runtime HTML template errors, if any, which improves the otherwise tedious work when a template makes the web service crash.

Go is superb at HTTP and all web related. We still have some PHP development, but would very much like to do Go all the way, we just haven't gotten there yet.

Last, but not least, we do not use any frameworks or libraries, only the Go standard library and we love it. No matter were we put it, it just always works and is very performant.

Post reply on HN