5 ms·
DadHacker on why C is staying
- stcredzero 17y agoFirst, he talks about things like numerics, then points out that it just doesn't matter for most programmers. "C won't go away." Of course not. [X] won't go away, where [X] is any number of languages.
- wallflower 17y agoLegacy code really is aptly named. There are COBOL and assembly routines in production that have outlived their programmers. Even if a product (for example Oracle AS being replaced by Bea WLS) is desupported/killed, it still lives on if it's still in use.
- humbledrone 17y agoThere are plenty of software jobs out there that require writing new components in C; I'm not sure that the same is true for COBOL. Sure, there's a ton of legacy C code, but there's also a great deal of new C code being developed, which makes it hard for me to see C as being "dead."
- stcredzero 17y agoNote that I never say C is "dead." I say that the record shows: good languages that are actually used don't go away.
- angelbob 17y agoC's not dead, but I agree with the article's author: its use will slowly erode, but never get to zero. It'll bottom out at a fairly steady, low rate, rather like COBOL.
- TallGuyShort 17y agoI really like Linus Torvald's quote: >> Some people seem to think that C is a real programming language, but they are sadly mistaken. It really is about writing almost-portable assembly language And that's why comparing C to other, more modern languages is kind of useless - it all comes down to what kind of programming you're doing. Even though more expressive languages have been created and more efficient ways to create programs are around, C is a very nice balance between high-level syntax and low-level actions.
- bprater 17y agoAgreed. When you are bit-banging and other low-level stuff, you want a language like C. It's such a silly argument. Good programmers pick the language that matches the problem they are trying to solve. Anyone that considers themselves a hacker isn't a square peg in round hole kind of person. They have several tools in their bag and will pick out the most appropriate one for the job. That's all the comes to mind these days when I see these arguments: people need to open up their field of view and see what other great language exist for their craft. Did Leonardo only use paintbrushes to write in his notebooks?
- stcredzero 17y agoYou can do bitwise operations in VisualWorks Smalltalk quite efficiently, particularly for encryption applications. Of course, it helps that the encryption library author and the VM engineer at the time collaborated closely. (Hence, the existence of classes like ThirtyTwoBitArray.) I seem to remember a study someone did with CISC machines like VAX. On average, a C statement resulted in 2.5 machine language instructions.
- hazzen 17y agoIt isn't the ability to do efficient bit operations that is a strength of C - it is the ability to easily and succinctly do whatever you want to the bits in memory. Arbitrary pointer/memory operations help greatly in writing things like memory managers, device drivers, and all of the other wonderful parts the make up the guts of an OS. edit: Added the text "easily and succinctly" as a qualifier on doing things to bits in response to stcredzero's comment. It isn't that C is the only language to allow it, it is that C allows one to do it without obscuring your intent. C# handles this quite well with unsafe blocks, Java not so much.
- smallblacksun 17y agoThe post starts with "This comment deserved some expansion." What comment? I spent 5 minutes looking around his site and still have no idea.
- mmphosis 17y agoLisp on bare metal