3 ms·
> the approach rust takes Quite a lot of D's innovative features have become standard in other languages as well. For example, there was an overlooked feature
by WalterBright 6y ago
> the approach rust takes
Quite a lot of D's innovative features have become standard in other languages as well. For example, there was an overlooked feature in Ada that I always liked:
int i = 1_000_000;
int phone = 214_222_1234;
I.e. _ can be inserted in numeric literals to make them easier to read. After D did popularized this, this feature started appearing in other languages.
Other such features include ranges, and staticif. Even static assert.
- mhh__ 6y ago> staticif Or not appearing in the case of that one. Slightly before my time but I read the C++ papers considering it and they are a bit strange.
- WalterBright 6y agostaticif has recently appeared in C++, just under a different name.
- mhh__ 6y agoThe solution C++ has - as Andrei says - is not the same thing as static if because it introduces a scope
- WalterBright 6y agoI thought they fixed that in the latest version, but I haven't been following it closely.