top | item 37100462

(no title)

lampington | 2 years ago

Great article, but I'm saddened by their view that C is too hard to work with, so the 2-year-old extension must be rewritten in Rust.

C certainly has its faults, and while I have no real experience with Rust, I'm willing to believe that it's significantly better as a language.

But pgvector, at least from a quick scan, looks like a well-written, easily comprehensible C codebase with decent tests. There are undoubtedly lots of hard problems that the developers have solved in implementing it. Putting time and effort into reimplementing all of that in another language because of an aversion to C feels like a waste of effort that could be put into enhancing the existing extension.

Maybe there's something I'm missing? Is the C implementation not as solid as it looks at first glance?

discuss

order

maximilianburke|2 years ago

Rust makes concurrency really easy, at least in comparison to C or C++. It has great cross-platform frameworks available, like Tokio which pgvecto.rs uses, and makes using them safe and straightforward.

ink_13|2 years ago

C also makes concurrency very easy. So easy the uncareful regularly shoot off both feet. Too easy.

throwawaymaths|2 years ago

I wonder if having that sort of "safe concurrency" causes developers to overuse concurrency and introduce coordination costs.

Do we know that tokio's concurrency strategy is optimal for database access?