4 ms·
It depends greatly on the task. If it fits neatly into the built-in data structures or smells quite systemsy and C-like, it's probably fairly easy in Go. Stri
by HereBeBeasties 6y ago
It depends greatly on the task.
If it fits neatly into the built-in data structures or smells quite systemsy and C-like, it's probably fairly easy in Go.
String and array manipulation are similarly painful to C. The lack of generics can be a massive pain in the neck, meaning you end up copy/pasting things, and other people's code doesn't tend to be very easily extensible without actually editing it to add the appropriate interfaces or whatever. The lack of OO is sometimes fine, sometimes not. It's really not a very expressive language. (I appreciate that's a rather fluffy/vague thing to say, but I feel it's true.)
On the other hand, you can cross-compile stuff trivially, you get nice self-contained binaries, it's generally sufficiently performant, and it's simple in the same kind of way C is, only with a garbage collector and easier threading (goroutines are pretty nice).
There's no more ceremony really compared to something like Python+Flask, but the business logic you end up running behind your web API calls _may_ be a bit more verbose and feel clunkier. Or if you're lucky it may not. It's very much dependent on what exactly you're doing.