4 ms·
Kernighan's response to the C question was rather odd -- where is this myth that C is only used in embedded systems and drivers coming from? The Linux kernel i
by agentultra 11y ago
Kernighan's response to the C question was rather odd -- where is this myth that C is only used in embedded systems and drivers coming from?
The Linux kernel is still written in C.
Ben Klemens, author of 21st Century C, leads the statistical computing group for the research arm of the U.S. Census Bureau. He models complex systems and computations in C.
The entire Python scientific computing stack is resting on C.
A huge portion of the GHC compiler is written in C.
Many AAA game developer studios are writing their engines in C (with vendor supplied C++ compilers, but C none-the-less).
And do people really write C89 for greenfield projects today? C99 is pretty amazing and has added some great features to the language. C11 might be the trivial change having only added some atomic operators (depending on whether you think this is trivial) and rescinding VLAs (though most compilers will probably continue to support them anyway).
I think Go is a perfectly fine language but it seems like perhaps the group is a little out of touch with the rest of the world judging by replies to questions like this.
- vvanders 11y agoThe trend in games these days is to move to C++ but there is still C used in some places.
- lobster_johnson 11y agoKernighan wasn't the one claiming that C was mostly used for embedded systems and drivers; that was the guy who posed the question. Kernighan only agreed that C is still popular in that space. As for C99, I would love to see some hard stats about rate of adoption. Personally I can't imagine starting out on a new project and not use C99, but then the hard-core C contingency is a pretty conservative bunch. (Are there still systems where you can't get a C99 compiler?)
- agentultra 11y agoYou're right -- Kernighan didn't say that and I didn't intend to imply that he had. Apologies for those confused. The rate of adoption question is interesting. If only there were a foundation or group out there shepherding the community and keeping tabs on such developments. If there is I'd appreciate being pointed to the right address.
- 4ad 11y ago> Are there still systems where you can't get a C99 compiler? In windows it's pretty annoying to get a C99 compiler. The "standard" compiler to do Windows development is Microsoft's, and it doesn't support C99. Of course you can install MinGW (gcc); most open source software on Windows uses it, but it's very unusual for the average Windows developer to even have gcc, and completely unheard of in the commercial space. I will also note that installing MinGW in Windows is a pretty painful experience as well, which doesn't help. For most Windows developers, if it doesn't ship in Visual Studio, it doesn't exist.
- lobster_johnson 11y agoThat's insane. Though I suspect it's because C++ has so much more traction in the Windows world, and that seasoned C developers forced to work on the Windows platform will immediately reach for MinGW or Cygwin. Last I checked, a lot of Unix software has to be compiled with GCC, anyway.
- cygx 11y agoDon't forget about the Intel C++ Compiler and Clang, never mind more obscure alternatives like TinyCC, Pelles C and Comeau C/C++. There are options. Also note that Microsoft has finally started improving C99 support with Visual Studio 2013 and 2015.
- pjmlp 11y ago> Also note that Microsoft has finally started improving C99 support with Visual Studio 2013 and 2015. Only as far as C++ standard requires C compatibility. For Microsoft the future for native programming on Windows are C++ and .NET Native. For compatibility with open source world and ISV that still care about C, the answer is the integration of Clang frontend with Visual C++'s backend, that is coming with Visual Studio 2015 Update 1.
- to3m 11y agoVisual studio 2013 supports enough C99 that you can get by (VLAs are the main omission). Visual Studio 2015 is supposedly fully conforming.
- pjmlp 11y ago> Are there still systems where you can't get a C99 compiler? - Commercial compilers for embedded space. - Security areas where compilers are certified.
- rdtsc 11y agoAlso of course Python itself is in C as well. Other language VM/runtimes are developed in C as well (Erlang, Lua?)
- agentultra 11y agoI'm not against downvotes but I'm curious what in this comment is attracting them? Would help me be more insightful in the future.
- flurie 11y ago> The entire Python scientific computing stack is resting on C. Aren't a lot of NumPy modules reliant on fortran libraries?
- wtetzner 11y ago> A huge portion of the GHC compiler is written in C. Is it? I thought it was written in Haskell. Or are you referring to the GHC runtime?