Re: [HACKERS] RustgreSQL

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: [HACKERS] RustgreSQL
Дата
Msg-id CAASwCXfn1TJwru0ZHGMthUr9TA0JF-UVahppUTbD0HqUgXSU_g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] RustgreSQL  (Craig Ringer <craig.ringer@2ndquadrant.com>)
Ответы Re: [HACKERS] RustgreSQL  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: [HACKERS] RustgreSQL  (Jan de Visser <jan@de-visser.net>)
Список pgsql-hackers
Thank you Craig for explaining the current C state of the project,
very interesting to learn about.

On Sun, Jan 8, 2017 at 4:19 AM, Craig Ringer
<craig.ringer@2ndquadrant.com> wrote:
> If a low pain seamless conversation/adaptation like that were possible I'd have to wonder what Rust could actually
offerus over C since it clearly has the same scope for issues if such an intermixture is possible. Kind of a catch-22.
 

Not necessarily. If you write non-idiomatic Rust and preserve as much
of the code style as possible from the original C code, and just focus
on getting ride of all usage of unsafe, then it will be more easily
understandable by existing C developers than if strictly writing
idiomatic Rust code.

> You'd have a lot more chance writing extensions in Rust though. If you can make it play OK with the exception
handlingin postgres and our memory management, at least. If you really wanted to push this forward... start there. Show
howgreat it is.
 

Funny you mention, that's actually exactly how these thoughts started
in my head. I realized I would need to write a C function to do some
computations that needed to be fast, but since C is dangerous I don't
know the language well enough I thought "I wish there was a safe and
fast system language you could
write database functions in!", and that's how I first found Rust and
then later this project:
https://github.com/thehydroimpulse/postgres-extension.rs
Which allows doing exactly that, writing extensions in Rust.

> You don't want to to learn C so dozens/hundreds of people need to learn Rust. What the?

Oh, I don't think you seriously think I meant to suggest others should
learn Rust just because I don't want to learn C.
I don't want to learn the complicated details of C, that's true.
But that has nothing to do why others would need to learn Rust. They
don't, unless the majority of the project would also want to move to
Rust, and that has of course nothing to do with me.
I'm just asking possibly stupid questions and having possibly stupid
theories, trying to understand why such a project would be possible or
not.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] RustgreSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Increase pltcl test coverage