news.volyx.in

C Is Best (2025) (sqlite.org)

408 points by alexpadula · 289 days ago · 559 comments on HN

Article summary

The article discusses why SQLite is implemented in C and why it will not be recoded in another language. The reasons for choosing C include performance, compatibility, low-dependency, and stability. The article also addresses the possibility of recoding SQLite in a 'safe' language like Rust, but concludes that it is unlikely due to various reasons. The author emphasizes the importance of C's simplicity and maturity for a project like SQLite.

Main themes

  • C programming language
  • SQLite implementation
  • Language choice
  • Performance
  • Compatibility
  • Safety features

What commenters say

  • C is a suitable choice for implementing a software library like SQLite due to its performance, compatibility, and low-dependency.
  • Some commenters argue that C's syntax is too rich and complex, while others defend its simplicity and succinctness.
  • Rust is considered a potential alternative to C, but its suitability for a project like SQLite is debated, with some arguing that it is not yet mature enough.
  • The idea of recoding SQLite in a 'safe' language like Rust is met with skepticism, with some arguing that it would introduce more bugs and slow down the code.
  • Some commenters suggest that Zig could be a viable alternative to C, due to its compatibility with C and better ergonomics.
  • The importance of being able to recover gracefully from out-of-memory errors is highlighted as a key consideration for any potential replacement for C.
  • There is disagreement over the usefulness of Rust's safety features, with some arguing that they are not necessary for a project like SQLite, while others see them as a major advantage.
  • The maturity and stability of a language are seen as crucial factors in choosing a language for a project like SQLite, with some arguing that C's age and boringness are major advantages.