On Sun, Jan 8, 2017 at 1:51 PM, Jan de Visser <j...@de-visser.net> wrote: > And this is where I think you're wrong, and why conversion would be hard. C > has very few complicated details. I don't think it has any, frankly. It > basically says "If you want your datastructure to outlive a function call, > I'll give you a chunk of memory and you're now responsible for it. Have fun". > That's not complicated: it's two functions, malloc() and free(), basically.
I don't think that that is true in practice. This paper summarizes why this is the case: https://www.cl.cam.ac.uk/~pes20/cerberus/pldi16.pdf At the same time, I don't think it would be a good idea to adopt Rust for Postgres development, and not purely because of our legacy (it might be interesting as a language for extensions, however). The contradictory goals of C are what results in the kind of ambiguity that that paper goes into. C may have contradictory goals, but that doesn't mean they're the wrong goals, even when considered as a whole. The culture that C is steeped in still makes a lot of sense for a system like Postgres. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers