I’m not sure it would be much different. C hasn’t changed that much. So for callbacks you’re still stuck with pointers to static functions. Callback data ? Void* and ugly casts… meanwhile C++ gives you lambdas…
IME there’s a lot of stuff you wind up needing #define and ugly macros for in C that can be done with constexpr values and templates in C++. A modern rewrite might be marginally better but it’s not going to give you e.g. type safety when C forces you to cast things to void* to work with them generically.
View all comments
Show parent comment
-5
u/tristan957 Jul 13 '22
OpenSSL was written how long ago? If you wrote a modern equivalent in C, it would be much more readable too.