It's quite a bit easier than Rust and no other popular language has its most important features (cross platform, interfaces with syscalls and other libraries easily, manual memory management possible, likely to be supported for a long time).
These things are useful in many situations.
For example, pre-computing values or parsing at compile-time.
This is useful for example in the following situations:
- You want to embed things at compile-time but keep things apart in a file. This file can be used at run-time when developing but is embedded and literally vanishes (you put your config directly in a struct) when deploying. - You do not want to spend extra time at compile-time. - No need to protect data at run-time with mutexes, etc.
The simplification it can yield is not immediately obvious. It can take a bit more work but the result is worth it. D is more powerful than C++ at this, btw.
I come from functional programming background, so I'm all for taking a little bit longer to make my code compile if that means it'll work. I'd rather deal with compilation errors than waking up at 2am to debug a stupid segfault.
this is not true anymore 90% of the time if you code with a decent knowledge... if you code C, then yes.
FTFY!