Comment by Panzerschrek
3 days ago
I have my own programming language, which is safe (unless one uses unsafe code), fast (compiled into machine code and uses no GC) and easier than Rust (has no traits and generally less boilerplate). It's influenced by C++, but isn't designed to be as close to C++ as possible.
So, it's pretty doable to do what you wish to do. But it requires a lot of effort, I have spent almost 10 years developing it.
I think all programming languages are "safe (unless one uses unsafe code)", no?
The question is how to tell which code is unsafe. In some languages it is easier, in some languages it's much harder.
For example in C and in C++, every line is potentially unsafe, so you have to verify the entire program very, very carefully.
On the other hand Java is safe, unless you mess with JNI. This is a very infrequently used feature, so for most programs you can be 100% sure there are no certain class of safety issues.
Rust has specific "unsafe" keyword - if you see it in a program, you have to be very careful. You can write quite a lot of Rust without ever using it.
All of them that I can think of are capable of producing safe(ish) programs. Mainly those where an empty file is a complete program.