4 ms·
How comfy is go for general native performance coding tasks? Basically looking for a C/C++ replacement. (I don't really like how Rust looks syntactically, and
by renewedrebecca 3y ago
How comfy is go for general native performance coding tasks? Basically looking for a C/C++ replacement. (I don't really like how Rust looks syntactically, and prefer GC over manual memory management.)
- lytedev 3y agoI'm not an expert at all, but I wouldn't. I would reach for nim or even zig before go. But it depends on what you're building, I'm sure!
- repeekad 3y agoPersonal experience is great, though for large projects C++ is definitely more robust. Really like how go handles parallelism and creating threads.
- germandiago 3y agoI think Go is a really good fit to write async servers. Its set of features make it a killer language for that use case.
- assbuttbuttass 3y agoI'm curious what are some of the reasons C++ is better for large projects?
- stevemk14ebr 3y agoLook into Nim or Zig instead if you're coming from C++
- germandiago 3y agoI would also recommend to take a look at D.
- deleted 3y ago[deleted]
- pjmlp 3y agoAs C replacement, I would say relatively ok, specially if you look at it from the point of view of Limbo in Inferno. As C++ replacement, I would stay is too lacking in features. For that I would rather reach out to C#, D, Java (with OpenJ9/Graal), or even Haskell/OCaml.
- kristianp 3y agoIf you're looking for the absolute top speed, it's not as fast as C++ or rust. Assembly functions can't be inlined, for example. But go allows you to control your memory structures and that gets you good cache utilisation, compared to, say java. Go is plenty fast enough for most applications.
- Alifatisk 3y ago> I don't really like how Rust looks syntactically I thought I was the only one!
- vineyardmike 3y agoIt’s generally designed to be the replacement you’re looking for. It comes from google, who has a lot of C++ code. Its memory managed, but relatively fast. You can’t beat languages that are designed for speed (c, rust) but it’s not python, and it’s closer to rust than python in terms of speed. Similar to Java probably. If you’re writing a web server or anything similar you’ll be fine. I wouldn’t reach for it to crunch numbers though (eg a ML model, image manipulation).