Re:Why Is SQLite Coded in C? (2017)
by bringtheaction on Wednesday March 14, 2018 @11:16AM
(#16585310)
Probably originally written as a response against C++, Java or C# yes. However it’s also been kept up to date because it mentions Swift, so I think they don’t want to rewrite it in Rust or Go. But I agree that Rust might have been a good fit if SQLite had been created today. There is the point that sibling commenter made about small embedded systems though. But some people work on making Rust useful even for microcontrollers so who knows maybe a SQLite in Rust could have been highly portable too?
[ Parent
| on HN ]
Re:Why Is SQLite Coded in C? (2017)
by jeffreyrogers on Wednesday March 14, 2018 @11:32AM
(#16585453)
Sqlite is often just dropped into a project as source code. You can't do that if it were written in Rust.
You can't do that with C code either unless your project is in C (or C++?).
Re:Why Is SQLite Coded in C? (2017)
by jeffreyrogers on Thursday March 15, 2018 @10:30AM
(#16593124)
Sure, but for many embedded systems you have to use C. Plus C interoperates well with every other mainstream language. Every platform supports C, so by writing it in C you can support every platform (with very few caveats).