Rust programming language?

The people who made Tiny Glade love Rust and said they never had a memory corruption bug. I know they used Bevy's ECS. I'd be really curious to see what their code looks like. I know game devs typically use C++ but it's kind of a C-style C++. I'd be really curious to see if Rust is kind of the same where Tiny Glade code would look different then say some other Rust code-base that isn't as concerned about real-time performance.
 
Try catching exceptions then.

Well, you can replace the entire standard library and then it's still C++. So technically you could have a standard library that doesn't have exceptions, or write code with exceptions, and you're still using the language and compiler. Guess it just depends on how you think of it. I'm guessing game devs use Rust in a similar way, and they have kind of standard practices for their use case.
 
The idea of not throwing is part of the standard, that's why std::nothrow exists. Exceptions suck if you interface with something else than C++ (e.g. C) that doesn't understand exceptions. And if you integrate middleware that comes pre-compiled, you'll use C as a glue since C++ doesn't have stable ABI. It's bizarre to call C++ w/o exceptions not a real C++. If I don't use templates it's not C++ either? What about standard library, do I have to use every std lib to call my code real C++?
 
Code compiled with fno-exceptions is not code which doesn't use exceptions, it's code which can't use exceptions. If some exception bubbles up from linked code, the process dies. A no exception codebase will only include/link to code written for no exceptions ... standard C++ is an incompatible language.

You can call it a dialect if you prefer, but it's not standard compliant C++.
 
Last edited:
... standard C++ is an incompatible language.
I would claim there is no "standard C++". Everyone uses different parts in different ways, and if you want to you can even go down to assembly for certain parts.
 
There is the C++ standards committee, and they release an official standard which tells you the definition for compilers and I guess the standard library. I guess they need the standard library to be the same across operating systems/platforms, so there is a definition for that as well to meet the 23 standard. The funny thing is, you have to buy the piece of shit which is wild to me. I haven't used C++ in a long time, and it looks a lot different now, at least if you're using all the new stuff. Honestly would never pick it back up again. I'd be way more likely to pick up Rust, Odin, Zig, Nim if I wanted something compiled with static typing. Rust is still really interesting to me. I played around with it two or three years ago. My only worry about it is they keep adding new features to the language and in ten years it might be a total mess. I like the idea of long-term stable languages that don't change.
 
Back
Top