my 0.02$,
I use C because it's simple, i know it well and it gets the job done. I've also used various other languages such as C#, C++ etc at work but never felt that the functionality they provide over C are worth the size, performance and portability issues they bring with them
for use inside an OS. Although by including portability I do not mean that C code is portable (or if OS code needs to be portable at all, usually it's well defined for a few architectures/VM only), just more easier to port than equivalent C#, C++ stuff. Having worked with embedded stuff gave me another reason to use C, C compilers support far more architectures/CPUs than C# (which is mostly run on a MS VM) or C++.
(I also compare size of code as I've have had relatively less cache miss on equivalent C code compared to C++ code, although one could argue my C++ code sucks as I am no expert with it).
Love4Boobies wrote:
I think it is mainly useful for embedded programming on resource-scarce platforms, as no better alternatives exist there.
Yes, it certainly is. But i don't get your argument of strictly confining it to resource-scarce platforms. Just because you have a few hundred thousand extra cycles you'll use something that isn't efficient and hence waste energy + time ?
Although the argument hasn't been raised here, The advantage of standard libraries in such managed languages and C++ doesn't matter at all, If done perfectly, You can have a well written library in C too. (ie. dlmalloc)
Feel free to enlighten me wherever I might have gone wrong.