Original title: The Development of the C Language<p>Editorialized title: “C is quirky, flawed, and an enormous success” – Dennis Ritchie<p>HN Guideline:<p>> [...] please use the original title, unless it is misleading or linkbait; don't editorialize.
My career is in full stack web development but I program in C in my master's degree coursework and as a hobby. Every time I have to peel back a decade's worth of CSS to move a button on a webapp I daydream of moving to a career in C. Is the grass actually greener on the other side?
Related:<p><i>The Development of the C Language (2003)</i> - <a href="https://news.ycombinator.com/item?id=19338525">https://news.ycombinator.com/item?id=19338525</a> - March 2019 (10 comments)<p><i>The Development of the C Language</i> - <a href="https://news.ycombinator.com/item?id=15134903">https://news.ycombinator.com/item?id=15134903</a> - Aug 2017 (22 comments)<p><i>The Development of the C Language* by Dennis Ritchie (1996)</i> - <a href="https://news.ycombinator.com/item?id=11973627">https://news.ycombinator.com/item?id=11973627</a> - June 2016 (1 comment)<p><i>The Development of the C Language (1993)</i> - <a href="https://news.ycombinator.com/item?id=10749358">https://news.ycombinator.com/item?id=10749358</a> - Dec 2015 (28 comments)<p><i>The Development of the C Language</i> - <a href="https://news.ycombinator.com/item?id=3439843">https://news.ycombinator.com/item?id=3439843</a> - Jan 2012 (1 comment)<p><i>The Development of the C Language</i> - <a href="https://news.ycombinator.com/item?id=2258287">https://news.ycombinator.com/item?id=2258287</a> - Feb 2011 (7 comments)<p><i>The Development of the C Language</i> - <a href="https://news.ycombinator.com/item?id=726519">https://news.ycombinator.com/item?id=726519</a> - July 2009 (1 comment)<p><i>The Development of the C Language (Dennis Ritchie)</i> - <a href="https://news.ycombinator.com/item?id=365080">https://news.ycombinator.com/item?id=365080</a> - Nov 2008 (1 comment)
"Although the first edition of K&R described most of the rules that brought C's type structure to its present form, many programs written in the older, more relaxed style persisted, and so did compilers that tolerated it. To encourage people to pay more attention to the official language rules, to detect legal but suspicious constructions, and to help find interface mismatches undetectable with simple mechanisms for separate compilation, Steve Johnson adapted his pcc compiler to produce lint [Johnson 79b], which scanned a set of files and remarked on dubious constructions."<p>Since 1979! And people keep complaining about being forced to use static analysis in C, on build pipelines.<p>"I know better", yeah, sure.
People who still write C, honest question: Why?<p>C is full of quirks. From cryptic "undefined behaviors" to a type system that isn't really a type system (more like "size hints for the compiler"), the language doesn't feel easy to use/debug. Add to this CPP macros, a universally recognized bad idea, a clunky import system, and lack of a single reference implementation of the compiler/libC, and you have a language that is harsh to defend.<p>Also, documentation is all over the place. If a function isn't described in `man`, I have no idea where else to actually look for it.<p>I used to think "C presents the most honest representation of the low-level mechanisms of the computer", but... even this is shaky. I've been programming for almost 15 years now, and I don't think I've ever seen a computer where memory is <i>actually</i> a continuous array of bits sorted by memory address. The C representation of memory (and all the pointer arithmetic) is not a <i>real</i> representation of your hardware, and this too is an abstraction.<p>So, setting aside the need to maintain 30+ year old code, what would be modern reasons to start a new project in C?
I want to read this. I'm also interested in the story of how SHA-0 was developed internally in the NSA if anyone has any idea.<p>I'm a little surprised at folks incredulity that C is used "nowadays". To me, there will always be a place for C. If you look at:<p>- the bulk of the internet traffic<p>- the bulk of the base OS systems and libraries it is running on<p>I'd say 99.9% of that is written in C. Hence my surprise.<p>I know Linus now embraces Rust in the Kernel or whatever and I'm not disparaging that, just seems obvious that C, old as it may be, is still highly relevant. C is a graybeard. Give it a break, right? :)
everyone should learn c/c++.<p>you need it when exploring the performance ceiling of a workload. without an understanding of performance ceiling, you can’t design a system well.<p>if you want to approach that ceiling[1], you need to implement c/c++. if not, it’s better to have chosen not than been forced not.<p>between ccls, clangd, and clion, tooling is fantastic now. it’s a great time to start.<p>1. <a href="https://github.com/nathants/bsv">https://github.com/nathants/bsv</a>
These men were/are giants in the field.<p>But look at how simple the language was in the beginning. A handful of concepts, strung together. Incremental changes; not all were deemed best in hindsight.<p>You can fit what is going on in 16K in your head.
""As we said in the preface to the first edition, C "wears well as one’s experience with it grows." With a decade more experience, we still feel that way."" -- Brian Kernighan
i had read this before, and it has been posted here multiple times, but somehow i had missed:<p>> Thus the core C language escaped nearly unscathed from the standardization process, and the Standard emerged more as a better, careful codification than a new invention.<p>which made me grin.
I wonder how much the pile of undefined behavior contributed to C's success. I can imagine that vendors picked C over alternatives due to C giving them more freedom with their implementation.
I just wish C had better compilers<p>Errors produced by current mainstream compilers are terrible.<p>"Unresolved symbol" being the best they can do is some joke