3 ms·
I have been enjoying learning and using C over the past few years. I think I see it the way Drew does. I have used it mostly alongside a dynamic language like P
by roryrjb 7y ago
I have been enjoying learning and using C over the past few years. I think I see it the way Drew does. I have used it mostly alongside a dynamic language like Python or Lua (either using the Lua C API or Luajit's FFI module) or in Nodejs wrapping a C++ interface around it (i.e. not using the more recent N-API interface), but sometimes I have used it by itself, but basically it has always been quite small in scope, so I don't have the experience of what it's like to use in a large project.
I started to use C and like I said only recently, with my eyes wide open. There are faults and foot-guns but the simpler you keep things the better. For me it's less about performance, even though naive C will likely be quicker than most dynamic languages out there (where most of my experience is) and more about manual memory management and much smaller memory usage. Another reason I like C is that it is available everywhere. Of course as the article mentions ("Use only standard features.") you need to take care of what is included for it to be available on other platforms easily or at all. I'm saying this as someone who is only targeting x86 desktops and servers rather than targeting other processor architectures, so I'm mainly thinking about different OSs. From the viewpoint of Linux and the BSDs on which I have some experience to talk about, as they are primarily in C, the whole stack is C and what I mean is that if you know C you can can potentially figure out how everything works and is put together all the way down to the kernel. I also can't overestimate just how good man pages are in Linux and BSDs for C functions, using them is probably one of the best learning experiences for C that I've found.