DEV Community

Discussion on: A World Without C

Collapse
 
ruicraveiro profile image
Rui Craveiro

Here's a pragmatic-ish approach to the topic. The time when I wrote C code the most intensively was during university, more than 2 decades ago and I still love the language until today. Since then I've been writing C stuff here and there, always to solve very specific use cases, but I've been using mostly higher level languages, C#, Go, Dart, with which I've successfully implemented lots of business applications. I have never made money out of writing an entire application in C or C++ and I don't see any good reason to use those languages as the main language for business application development.

However, I've used FFI to reuse C code, but I've also used FFI to call Go code from Dart (with very minimal or no C code in the middle - tech.craveiro.pt/go-for-dart-with-...). So, you do have a great point about FFI, even if neither language is actually C. However, I would hope WASI would replace that role in the future.

Having that said, I can't imagine the Linux kernel being rewritten in a memory safe language, or XNU or the Windows NT kernel... you get the idea. But, Linus Torvalds seems to be OK with Linux drivers being written in Rust.

So, in conclusion I would say that C isn't going away as a systems programming language, but it should go away as the glue between other languages and, except for maintaining existing applications, it shouldn't be used for application development at all. (I am not including embedded systems, IOT, and so on in the discussion as I have no experience with those, so no valid opinion).

I still think that it should be the first language every developer should learn, though as it creates great foundations.