3 ms·
I never said it competes with C, it's just almost syntactically C with type safety and concurrency primitives. It's a good way to think of the language as that'
by Philip-J-Fry 5y ago
I never said it competes with C, it's just almost syntactically C with type safety and concurrency primitives. It's a good way to think of the language as that's where its simplicity comes from. Also, pretty sure most things that "need" to be written in C can be written in Go, except things like real-time operating systems. They might not be as performant in a lot of cases, but there's nothing stopping them.
The other thing is you're saying _need_ to be written in C. Out of the millions of C applications out there, do you actually think the majority need to be written in C? C is good in a lot of places, like kernels, or very constrained systems, but would something like cURL need to be written in C? I'd argue not. A lot of developers swear by C because they like how basic it is. Go gives you almost the same levels of basic syntax and then stops you corrupting memory accidentally.
The other strength of Go is that it's trivial to target so many different platforms. I can take an application that runs on Windows and then run it on Linux. And then run that same application on an Arduino or ESP32 microcontroller with minor changes.
Maybe you wouldn't build an OS kernel to challenge Linux in Go. But people have built kernels in Go. There's nothing that prevents you from doing that other than the aims of your kernel. It's not stopped people writing kernels in Java or C# before.