Re: RustgreSQL

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Jan de Visser <jan(at)de-visser(dot)net>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Joel Jacobson <joel(at)trustly(dot)com>, Craig Ringer <craig(dot)ringer(at)2ndquadrant(dot)com>
Subject: Re: RustgreSQL
Date: 2017-01-08 22:58:29
Message-ID: CAM3SWZRSSPdHz+fHYTH3fZA_C5u0UrF616pJ4j6kqZd+JqfjgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 8, 2017 at 1:51 PM, Jan de Visser <jan(at)de-visser(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Flower 2017-01-08 23:05:38 Re: RustgreSQL
Previous Message Michael Paquier 2017-01-08 22:31:51 Re: RustgreSQL