And, is potential safety 5+ years in the future (that's an absurdly optimistic estimate of a rewrite for an OSS project the size and scope of PostgreSQL) worth effectively standing still for all that time? Is the security/stability history of PostgreSQL poor? I'm not under that impression.
Rust's safety model allows you to get the optimization of C's restrict without the footgun. That can be a big win.
But of course, just because something is written in Rust doesn't mean it'll be faster than the equivalent C code. Rust isn't magic, after all.
[1]: https://doc.rust-lang.org/reference.html#behavior-considered...
I get the appeal of Rust for a new project though, especially if your team doesn't consist of seasoned C programmers.
> Well that's going to be a show-stopper right there. For a proper
> port, a deep understanding of the current source code is necessary.
> You'd need a team expert in both C and Rust to pull it off.The weird thing is that they clearly have the sense to recognize that a rewrite would be a non-trivial project, but they seem to completely misunderstand why.
Well, yes and no.
On the one hand unsafe Rust is roughly similar to C[1], and unsafe Rust is a subset of Rust. But unsafe Rust is not the most widely used subset of Rust, stable Rust is ! And stable Rust is arguably way easier to understand and work with than C. And you can write fairly complicated software without writing a single line of unsafe code.
[1]: even though, the more expressive syntax and type system of Rust makes a lot of things less error-prone in Rust, like pattern matching or Result<> for error handling instead of switch and goto.
Your dedication to provide answer and explanations to absolutely everybody everywhere on the internet is incredible.
How many people do you keep enslaved in your basement to do all that work ? :p
There's a reason many, many person-years have been devoted to tooling: offloading as much of the "simplicity" as we can onto computers is the best way we know how to write correct C at scale.
(That said, PostgreSQL clearly works well enough and has a system for writing new code that works well enough, so proposing a wholesale rewrite into a different language seems... unproductive, even moreso than usual.)
If the author finds C overcomplicated I look forward to finding out what they think of a complete database system.