r/programming • u/chrisdew • Sep 26 '09
Ask Proggit: What are the most elegantly coded C/C++ open source projects?
I've recently been reading (parts of) the source for sqlite3 and found it to be a revelation in good programming practise.
What other C/C++ open source projects (of any size) would you recommend that I look at, in order to get an idea of current good practise?
147
Upvotes
View all comments
Show parent comment
4
u/austinwiltshire Sep 27 '09
I'm sure there are reasons you are correct. But in this particular case, inlining function calls is pretty easy in the context presented. I'm not asking the compiler to tell whether or not a pointer is aliased from multiple places or not.
I think it's more of a matter of asking for an "insufficiently dumb" compiler. It's like integer divide by two. If a compiler doesn't turn that into a bit shift nowadays, you've definitely gotten a sufficiently dumb compiler.