3 ms·
Case in point, any interface heavy C codebase. Function after function of laying out function pointer vtables.
by DubiousPusher 8y ago
Case in point, any interface heavy C codebase. Function after function of laying out function pointer vtables.
- the_clarence 8y agoOr not having a good std crypto library: a million of shitty libraries
- simias 8y agoI don't think that's a very good example, there aren't that many "production grade" crypto libraries out there. I think the root of the problem is that C simply lacks the features necessary to write safe code, it sometimes feel like the language is actively trying to trip you up instead of having your back (implicit casts, weird aliasing rules, lack of generics and in particular "safe" containers like C++'s std::vector, completely implicit ownership semantics etc...). This makes is very difficult to interface crypto code nicely and safely using a pure C API. That's not to say that C crypto libraries don't suck for other reasons (I've used OpenSSL, I can't really defend that) but the language itself limits what you can do, in the standard library or otherwise. I mean, look at the many flawed or error-prone interfaces in the C standard library itself, I don't think stdcrypto.h would be the panacea.
- jstimpfle 8y agoOut of curiosity, what would be an example programming domain with a lot of interfaces?
- xfer 8y agogobject library? Gtk uses this, which tries to emulate OOP.
- DubiousPusher 8y agoYou mean programming domain in general or a codebase in C? There's a ton in Java, C++ and C#. One example in C is the proton implementation of AMQP.