Zig, Hare, Odin, Vale, V, Jai
There are a lot of new languages that try to be "a better C" or "less complicated C++". Are there people here who are familiar with some of these languages that would be willing to share their opinion about what they think these languages are trying to solve? I mean, how they are different from C or C++.
18 comments
[ 3.4 ms ] story [ 59.4 ms ] threadZig is aiming to be a C-compatible alternative with less cruft and footguns.
If I would have to take a guess, Zig and possibly V would most likely be used and the others are just experiments.
https://www.reddit.com/r/C_Programming/comments/nqkn93/what_...
I don't think that they are trying to replace Java or Python, but C, for the areas where C is used today.
It's just somewhat rare to see statically typed languages with modern concurrent GC. Go is one example, and Go is remarkably fast. Meanwhile Java has been running on more resource constrained systems for 30 years than Rust can target today, for example.
So not so much future as present.
I believe the original Minecraft is written in Java(?), but it's not really competitive with something like Unreal Engine.
Out of curiosity, which databases are written in GCed environments?
Unreal packs its own garbage collection. This is a pattern you see quite often, GC is discarded because it's slow/the specific implementations don't fit the task, so an alternative GC is written to be used in a lower level language that doesn't require it natively. Contrast to Unity which uses C#. As for Minecraft, like I said originally you don't want to look at just GC for performance problems - that's a naive understanding of why languages perform poorly. Java is actually extremely fast and used in environments with tighter constraints than a game like MC.
https://github.com/gostor/awesome-go-storage#database
https://java-source.net/open-source/database-engines
Not a database but honorable mention, LMAX disrupter: https://lmax-exchange.github.io/disruptor/
That's a bit like saying that a Formula 1 car is slower than a Toyota Yaris when operated by a poor driver? What are you implying here?
So you're saying that with languages without GC, you can tailor your own GC that is a good fit to the problem you're trying to solve? Or that when the problem you are trying to solve is a good fit for the GC in your language of choice, you get good performance with less effort?
That's a huge list of databases that I've never heard of. In a sample of the categories, I looked for the most performant one, such as "NoSQL" where the one that comes out as best on benchmarks was Mongo DB which is written in C++. Why are all the number on spots on benchmarks written in C or C++ when the potential of GC languages is higher? Or maybe I'm misunderstanding.
So, yes, if it makes sense, you can write drivers, operating systems, databases, browsers and games etc.
Zig's C-interoperability is actually pretty huge in this context. Not familiar with the other 5 languages the OP listed.