Re:We still chose C++ (instead of Rust) for new database dev...
by unshavedyak on Monday September 29, 2025 @10:02AM
(#45413962)
Your post reminds me of the old runtime vs compile time language debates of old (for me). Some would argue duck typing is all that we need, and that lots of tests can cover the missing types/etc. Eventually i realized that i'm just manually implementing compile time typing by way of robust tests to cover interface requirements.
[ Parent
| on HN ]
Re:We still chose C++ (instead of Rust) for new database dev...
by sdeframond on Monday September 29, 2025 @10:08AM
(#45414020)
> Eventually i realized that i'm just manually implementing compile time typing by way of robust tests to cover interface requirements
This, so much this!
Re:We still chose C++ (instead of Rust) for new database dev...
by dataflow on Monday September 29, 2025 @12:34PM
(#45415752)
Note that duck-typing can still be a compile-time thing: it's basically what you'd get in C++ if you use auto and templates for everything.
The trade-off between compile-time and run-time checking depends in large part on the time needed to address the issue. It's not really black and white. People just don't want to wait forever for static verification - I think that's kind of why clang-static-analyzer isn't used as much as clang-tidy.