5 ms·
I remember reading an answer on Quora by a professional C developer why none of existing newly designed programming languages will ever replace C and to be hone
by stephen82 10y ago
I remember reading an answer on Quora by a professional C developer why none of existing newly designed programming languages will ever replace C and to be honest with you, I agree with him.
https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why/answer/Roger-DiPaolo https://www.quora.com/Which-language-has-the-brightest-futur...
- nickpsecurity 10y agoI'll review it for you as a C opponent who used C and safe alternatives at various points in time. 1. C is popular. Means nothing for its approach since COBOL, DOS, and VB6 were massively deployed. He'd not endorse them I bet. It won't go away, though, due to socio-economic reasons. 2. C is popular No 2. In embedded with same result as above. Meanwhile, there's embedded projects in subsets of Ada (lots of these), Haskell (Galois Ivory or Atom), Oberon (see Astrobe), BASIC (mikroBASIC), Pascal (mikroPascal), Python (microPython), LISP (L lang/Franz), Ocaml (OcaPIC), and ATS language (8-bitter). A few of these have serious advantages over C. One is niche industry with tens of millions probably spent. 3. C has ecosystem advantages. Definitely true for C and many others. Fortunately, you can use C's ecosystem using what's called a FFI. You can compile to C. So, you can avoid C at your level while benefiting from it. Replace the pieces gradually if you want. Rust is an example of better language trying to integrate well w/ C ecosystem while letting you incrementally rewrite it. 4. "C just works." Propaganda piece in action. C ecosystem is legendary for problems at compile time, build time if 3rd party, and runtime. Even pro's make common mistakes. On other hand, Ada (esp SPARK) and Haskell will tend to run without crashes if you can get them to compile. You have to really work to cause as many problems as average coder runs into with C. 5. "C is, and was designed to be, a “portable assembly language”" This is a myth I demolish in my article above using primary, source material. C was meant to code on three, specific machines with specific philosophies. It inherits their traits in ways that help and harm. It was ported because it was so small & limited. Incidental. An example of portable assembly language is P-code Wirth created to make Pascal portable. He knew writing compilers, standard libraries, OS's, etc was too much for average developer. So, he made an idealized assembler that was super-easy to port. He targeted compiler backend of Pascal/P to generate P-code. They just port P-code then get all the software using same, reference compiler. The result was Pascal was put on 70 architectures in about 2 years varying from 8-bitters to mainframes. I'm still curious what the number and timing was on C ports for comparison. 6. "Your garbage collection, your classes, your libraries and APIs" Alternatives like Modula-2 were about as simple as C just safer, easier to compile, and with less problems. Light, manual C vs heavyweight, OOP, Java or C# is false dilemma. Especially given my list above. Author has done no research in safe, systems languages. I could stop knowing that but I'll be a good sport. :) 7. "C is not a language for programmers that need to be babysat or have their hands held. If you can’t deal with managing your own arrays manually" This kind of counterpoint was originally directed at C itself by assembly and Fortran programmers. It embeds the false assumption that a person with limited time, energy, and focus should spend that on micro-managing a machine because a language designer told them to. If that's unnecessary, that person shouldn't be doing that & it follows C is a waste of time/energy. If it's occasionally necessary, a good language will allow you to optionally do that only where needed. If it's not necessary, a good language will do it for you quite efficiently. A great language will allow all three. Keeping complexity low, I'd say Wikipedia's Modula-3 page illustrates such a language. One neat use was in SPIN OS that could safely load code into a running kernel for acceleration. So, the author points out popularity has advantages, ignors our ability to use it regardless, pretends C ecosystem is seemless, misinforms about portability, only compares his apple to oranges, and tells people to waste time just because. Terrible defense of C. I've seen some decent ones and plenty of use-cases I agreed on for practicality. This just shows the author has done almost no research on the subject past reading some proponents' claimed advantages on their marketing pages.
- fulafel 10y agoOTOH C has been replaced in many of its previous application areas, and the process continues. A lot of the software people now write in JS, Python, Clojure, C# or CUDA would have been written in C 20+ years ago.
- nothrabannosir 10y agoIf you look beyond the name calling and ad hominems, that entire article can be summarized as "C is popular now, so it will be forever." Which is laughably naive and short-sighted. Quite possibly the worst defense of C I have ever read in my life. And I like C. (ps: "professional C developer" doesn't say much. I've worked in embedded systems with C for years, so what? that doesn't make me right. don't be misled by his bloviating and chest thumping; his point is weak.)