4 ms·
I personally tend to choose Go for newer projects as I'm looking for the efficiency of C and safety/elegance of more "modern" languages. However, I always keep
by dvfjsdhgfv 9y ago
I personally tend to choose Go for newer projects as I'm looking for the efficiency of C and safety/elegance of more "modern" languages.
However, I always keep an eye on D and Nim. It seems these are the only two languages that can compete with Go in both above aspects.
- Ar-Curunir 9y agoGo is not in the league of C for efficiency though? Very different kinds of languages...
- _ph_ 9y agoIn my day to day work, I find Go very much in the league of efficiency of C, if, for robust and real programs, not beyond. Low level Go code compiles the same as C code does (yes, C compilers have better optimizers), you have sometimes to pay for some overhead (bounds checks, GC), but that often pales compared doing this by hand in C, when you need a reliable and robust application.
- nhumrich 9y agoGo is nowhere near the speed of C. But why not consider Rust?
- dvfjsdhgfv 9y agoThe Rust team decided to promote Rust as a "systems programming" language. And even though it can obviously do much more, and the bindings for most popular libraries are available [1], this label somehow attracts programmers who are more systems oriented and I think the language will continue to develop in this way, whereas Go/D/Nim will tend to try to be more general. [1] Imagine how surprised I was the other day to find Rust bindings to Allegro, a venerable game programming library from the old days of DOS and DJGPP...
- lobster_johnson 9y agoRust is getting to be popular for graphics and games, precisely because it has the performance of, and easy interoperability with, C, without GC, and in a much more modern environment. Low memory requirements means portability to memory-constrained platforms. Interoperability with C presumably also implies easier access to low-level resources such as GPUs, and being able to take advantage of existing libraries for C, such as SDL. People are also experimenting with Go in the same space, but it seems much less promising. Go is notoriously slow at calling C (or being called from C) due to goroutine context save/restore. It also has GC and a runtime.
- apersona 9y agoI don't see why it's surprising to see a game programming library binding for Rust. I was drawn to it because it was advertised as a "systems programming" language. From a graphics perspective, this means that it's trying to be fast and gives me good control over low level stuff.
- tscs37 9y agoI've tried to get into Rust but I've found the syntax alone to be impenetrable despite reading through several guides multiple times. If Rust was less complicated I might consider it.
- nimmer 9y agoNim is among the fastest, more high level and people seem to like the Python-like syntax.