> A Rust implementation of PostgreSQL, with its runtime checks, would almost certainly be slower than the existing implementation. So a Rust port is a non-starter.
Wait, which runtime checks are you talking about ? This is a recurring FUD we often see on HN about Rust and I'd like to clarify this point.
IIRC, there is no mandatory runtime check in idiomatic Rust except UTF8 validation for strings[0]. There is no overflow checks on numbers, and no bounds checking when using iterators[1]. Another known overhead is the default use of siphash in hashmaps for DoS prevention[2], but this is not really a «runtime check».
Do you have anything else in mind ?
> Speaking of which, the PostgreSQL project is healthy and has many, many contributors.
Indeed, and as I said, I'm not advocating for a port of PostgreSQL in Rust. But for other projects that suffer from a lack of attention[3], it could be a good move.
> And while we're discussing developer productivity, I can't even imagine the build time of a Rust port.
touché, but compile time is one of the biggest focus of the Rust core team atm, so I'm confident things will improve in 2017 :)
[0]: which can be worked around if need be by using &[u8] instead of &str (see: https://news.ycombinator.com/item?id=13268051 from /u/burntsushi)
[1]: there are bounds checking when you access array elements through indexes, but most of the time you don't do that since iterators are great. If you really need to, and this have a performance impact, you can opt-out the bound checking in unsafe block.
[2]: But this is opt-out by using a different hash function, if you use your hashmap in a non adversarial environment.
[3]: like librsvg which was chronically under-maintained.