- C teaches you how computers work.
- Haskell teaches you how programming logic works.
- C teaches you how computers work.
- Haskell teaches you how programming logic works.
But C has immense cultural value. Lots and lots of extant source code, important source code: Linux. The BSDs. PostgreSQL, SQLite, whatever.
C is the lingua franca. "Everybody" speaks at least a little C, so it can be used as pseudocode notation (without learning some specific, maybe even ad-hoc, pseudo language).
Yes, exactly! In my opinion, C for a programmer or computer scientist is like Latin for a medieval scholar. You don’t need to speak it fluently, but it’s good to know enough to read other people’s works and understand how concepts are expressed.
In practical terms, I think that almost any programmer can benefit from reading K&R and doing the exercises in it, even if they never go on to write “real” programs in C. The book is very short and readable, and finishing it is a much tinier task than learning the standard libraries and toolchain options and best practices and all the other stuff you need to be productive writing production-quality code.
Most any CS book seems to have been written in C, Java, C++ and lately, Python. Are there books on computer architecture, algorithms, compilers, whatever written in Scheme?
Are you interested in finding such a book? Do you try to refute any of my points? If so, which one?
> Are you interested in finding such a book?
Yes.
Off the top of my head, only Structure and Interpretation of Computer Programs. But that's... different.
And Paradigms of Artificial Intelligence Programming.
Google it -- it's freely available on-line, along with a video lecture series.
It's different, in that it doesn't teach Scheme (Lisp). It teaches computation (aka CS).
Go from there.
There are plenty of CS books where the code targets Scheme, another Lisp, or another functional language (e.g., ML or Haskell.)
- Structure and Intepretation of Computer Programs (SICP), used for decades in MIT’s introductory CS course: https://mitpress.mit.edu/sicp/
- Picturing Programs: http://picturingprograms.com/
- How To Design Programs: https://en.wikipedia.org/wiki/How_to_Design_Programs
- Programming Languages: Application and Interpretation: http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04...
Except it doesn't. If any language "teaches you how computers work", its assembly. While a lot of the quirks of C's design compared to more "pure" structured programming languages (e.g., Pascal) reflect a desire to provide more direct access to common low-level features of systems of the time when C was introduced, it doesn't really teach you how computers work except insofar as trying to understand its quirks might motivate some inquiry into how computers work.
Maybe programming 101 should start with a higher level language and dive slowly on "how does that work?".
Of course the compilers, networking, and robotics classes all assumed fluency in C, and of those, the series on compilers was required, so it was impossible to escape learning at least some enough C to pass those classes.
Though if you were to start with a language C might be a good one just to show you how sloppy thinking leads to incorrect behavior and poor performing programs.
This will (apparently) never happen. I actually had a conversation with the mathematics department chairman about this after I took the formal logic course as a junior in college. "Why wasn't this the first course I took?" I made A's on all subsequent math courses; I'd been a lot B's and C's up to then.
He didn't say he knew why we don't. Now, this is a smallish college that started as a normal school - a teacher's college - and still is a teacher's college. The only graduate courses there were in education.
I think we all actually know why. We cargo cult these things to a deep level. I don't think it's intentional; I think that very few people know what rigor and formalism are. It's painful to learn.