4 ms·
Fair, I forgot that Rust has good freestanding support. I still don't think it'd be a good candidate for sqlite, though, for one reason in particular: Rust is n
by Sir_Cmpwn 9y ago
Fair, I forgot that Rust has good freestanding support. I still don't think it'd be a good candidate for sqlite, though, for one reason in particular: Rust is not competitive with C on portability.
- dom96 9y agoWhich is why Nim would be a good candidate. Compiles to C so has the benefits of its portability, interoperability and speed.
- Sir_Cmpwn 9y agoOh please please no! Nim is almost impossible to debug at a low level and you have no fine-grained control over its performance or behavior. It's also far less well understood than C, which is more boring and the subject of decades of conservative development. I'm also not sure what kind of support nim has for freestanding programs.
- dom96 9y agoCan you elaborate? I've never had problems debugging it, you can use lldb or gdb to do it. You have a hell of a lot of control over its performance and behaviour. Are there instances where you found that wasn't the case? As far as the understanding of C goes, I can agree with that. But we are discussing rewriting sqlite in something else after all.
- fiedzia 9y agoDoesn't it come with GC? That would limit embedding.
- dom96 9y agoThat's true. You do have the option to disable it though. Seeing as Go was suggested above (which is also garbage collected), I figured I would mention Nim too.
- rwbt 9y agoInteresting. I love programming in Nim but I'm not sure if I would consider developing something like SQLite in Nim. It still has a few rough edges IMHO.
- dom96 9y ago> It still has a few rough edges Love to hear what those are and what language you would consider developing SQLite in.
- rwbt 9y agoI'm nowhere near technically competent to develop something like SQLite in any language. Richard Hipp is a legend unto himself. But, I tried working in Nim without GC and out turned out to be a bigger hassle than I expected it to be. GC was supposed to be ref counted and now they're doing memory regions? There is also a -gc:stack which I'm not sure if it works the way like in C++. Then there is the pointer free paradigm. Don't get me wrong, I'm very optimistic about Nim and would be great if it really replaces C. But I feel like it's doing too many things at once. I personally feel like Nim dev team should stop adding new features every release and work on releasing a solid 1.0.
- steveklabnik 9y agoYes, agreed. It's not a real answer yet, but mrustc can compile Rust to C, so if this becomes a really huge blocker, we could put in some elbow grease and make it a real answer. The question is mostly "is that worth the time or not?"