6 ms·
Slightly off topic, but C/C++/Rust are always the go-to languages when talking about high performance. People love the speed of C but it's so bare-bones that th
by sdegutis 7y ago
Slightly off topic, but C/C++/Rust are always the go-to languages when talking about high performance. People love the speed of C but it's so bare-bones that they move to C++, or it's too dangerous so they move to Rust. But those are much too complicated, so people came up with Zig and Nim and D instead, but those are very far from C, even though they're not as far as C++ and Rust. So I'm wondering, are there any languages almost as close to C but slightly safer and slightly less bare-bones? Because I like C a lot, I think it's a great language with an excellent simplicity, except for some slight rough edges.
- coldtea 7y agoUnfortunately no. We could have a better/safer C but alas we don't. It's either C or all the way to Zig/Rust/etc territory (or using C++ like C).
- nicoburns 7y agoZig seems very close to C to me. What makes you think it's different?
- blattimwind 7y agoThe gap between C's model and a somewhat memory safe language is unfortunately very large. You can either limit semantics a lot, use GC (mostly-D, Go, ...) or have relatively complex ways to describe life times (Rust).
- eclat 7y agoCrystal? Hasn't reached 1.0 though.
- snazz 7y agoI think Crystal is garbage-collected, right?
- rafaelvasco 7y agoYeah, the whole language is designed around it. Impossible to remove without rewriting it from scratch: https://github.com/crystal-lang/crystal/wiki/FAQ#language-x-has-feature-y-why-dont-you-have-such-feature https://github.com/crystal-lang/crystal/wiki/FAQ#language-x-...
- fragmede 7y agoIf you're looking for "slightly", there are libraries to use that expose macros and function calls, instead of directly accessing pointers, along with the "n" version of libc functions.
- marmaduke 7y agoMaybe ATS? C--? Cython?