3 ms·
This is the same reason why I love C, and why I think that, for projects larger than a 1000 lines, it allows me to be MORE productive than more sophisticated la
by jstimpfle 7y ago
This is the same reason why I love C, and why I think that, for projects larger than a 1000 lines, it allows me to be MORE productive than more sophisticated languages. Possibly even resulting in a smaller linecount, but at the very least less accidental complexity.
One small red/blue pain point in C is varargs - for most varargs functions I have to make a "..." and a "va_list" version.
- tracker1 7y agoWhen using a C library, who's code is responsible for allocation objects? Who's is responsible for freeing said objects? That alone leads to a LOT of issues. Not to be evangelical, but give Rust a look.
- jstimpfle 7y agoSeriously, all these language mechanisms like RAII make it a lot harder to write modular code. Look at the mess that C++ got itself in, with its constructors, default constructors, move constructors, rvalue references, exceptions (required as a consequence of constructors), and what not. It's hard to believe Rust could make it significantly less painful. Programming is mostly not about initialization and deinitialization. If it is, you're doing it wrong, you have too many small objects. Yes, stack allocated STL containers can be nice for quick "scripting". But I will happily write a few function local deinitialisations to enjoy much less convoluted and interdependent, slowly compiling code.
- steveklabnik 7y agoRust makes it less painful by not having constructors, default constructors, move constructors, rvalue references, or exceptions.