|
|
|
|
|
by pinealservo
4500 days ago
|
|
I have a hard time understanding the supposed elegance of C. I know it pretty well and use it all the time, but only because it's what the platform demands. On the one hand, C has a tiny runtime that can be omitted or replaced. On the other, it doesn't have all sorts of things that would be helpful but not require runtime overhead. My biggest complaint is lack of a module system. #include is a stupid ugly hack. Second would be the way it doesn't let you portably define and work with low-level data representations in a standard way. I don't count manual bit masking and shifting for this. I would also really prefer a more advanced type system, including parametric polymorphism integrated with the module system, but not via templates. |
|
I'm not saying C is elegant. What I like about C, is that (in my *NIX/BSD world) it is THE language, that is always available and works the way I expect - even on old FreeBSD machine, that hasn't been touched for a decade.
It is also the language I can use for embedded computing.
In general: the more C and C++ code I have, the more systems I can create well-functioning, speedy programs for. I don't need to learn a new language's pitfalls, bugs, shortcomings, etc... I can just rely on my knowledge of C and get to know the platform I'm developing for.
That said - I recognise that some languages are more suitable for a given problem than others. I currently code a lot of Node.js (which I am starting to regret - I wish I'd chosen Go), but there is no doubt, I gain a lot in terms of not having to think about net layer (too much) and the community has made a wealth of modules of varied quality (myself included).
I think you could say, C is my favorite cordless drill! :) C is a tool that works very well for many cases - at least the once I come across. There is more specialized tools for many things, but I like simplicity.