Live data from Hacker News

C isn't a programming language anymore (2022)

faultlore.com

41–50 of 217 posts

Re: C isn't a programming language anymore (2022)

#41

Earlier quoted context omitted.

It wasn't a coincidence, or an accident. C was specifically designed to write Unix, by people who had experience with a lot of other computer languages, and had programmed other operating systems including Multics and some earlier versions of Unix. They knew exactly what they were doing, and exactly what they wanted.

I'm not sure what you mean by "coincidence" or "accident" here. C is a pretty OK language for writing an OS in the 70s. UNIX got popular for reasons I think largely orthogonal to being written in C. UNIX was one of the first operating systems that was widely licensed to universities. Students were obliged to learn C to work with it. If the Macintosh OS had come out first and taken over the world, we'd probably all be…

Repeating a previous comment of mine (https://news.ycombinator.com/item?id=32784959) about an article in Byte Magazine (August 1983) on the C programming language:

From page 52:

> Operating systems have to deal with some very unusual objects and events: interrupts; memory maps; apparent locations in memory that really represent devices, hardware traps and faults; and I/O controllers. It is unlikely that even a low-level model can adequately support all of these notions or new ones that come along in the future. So a key idea in C is that the language model be flexible; with escape hatches to allow the programmer to do the right thing, even if the language designer didn't think of it first.

This. This is the difference between C and Pascal. This is why C won and Pascal lost - because Pascal prohibited everything but what Wirth thought should be allowed, and Wirth had far too limited a vision of what people might need to do. Ritchie, in contrast, knew he wasn't smart enough to play that game, so he didn't try. As a result, in practice C was considerably more usable than Pascal. The closer you were to the metal, the greater C's advantage. And in those days, you were often pretty close to the metal...

Later, on page 60:

> Much of the C model relies on the programmer always being right, so the task of the language is to make it easy what is necessary... The converse model, which is the basis of Pascal and Ada, is that the programmer is often wrong, so the language should make it hard to say anything incorrect... Finally, the large amount of freedom provided in the language means that you can make truly spectacular errors, far exceeding the relatively trivial difficulties you encounter misusing, say, BASIC.

Also true. And it is true that the "Pascal model" of the programmer has quite a bit of truth to it. But programmers collectively chose freedom over restrictions, even restrictions that were intended to be for their own good.

Re: C isn't a programming language anymore (2022)

#42
post #38
post #29

Earlier quoted context omitted.

I don't see that as a problem. C has been the bedrock of computing since the 1970s because it is the most minimal way of speaking to the hardware in a mostly portable way. Anything can be done in C, from writing hardware drivers, to GUI applications and scientific computing. In fact I deplore the day people stopped using C for desktop applications and moved to bloated, sluggish Web frameworks to program desktop apps.…

Ok you're still missing the point. This isn't about C being good or bad or suitable or unsuitable. It's about whether it's good that C has, through no deliberate set of choices, ended up embodying the interface that lets us build rust that can be called by go.

Yes, because C is, by virtue of its history and central role in the development of all mainstream operating systems, the lowest common denominator.

Also, if I remember correctly, the first Rust and Go compilers were written in C.

Re: C isn't a programming language anymore (2022)

#43

None of the alternatives have stability. What was exemplary & idiomatic rust pre-pandemic would be churlish & rejected now and the toolchain use would be different anyway. Carpenters, plumbers, masons & electricians work on houses 3-300 yrs old, navigate the range of legacy styles & tech they encounter, and predictably get good outcomes. Only C has, yet, given use that level of serviceability. C99, baby, why pay more…

> Only C has, yet, given use that level of serviceability.

On the contrary, Lisp outshines C to a large degree here. Success has nothing to do with technical merit (if such a thing even exists), it's not a rational game.

Re: C isn't a programming language anymore (2022)

#44
post #42
post #38

Earlier quoted context omitted.

Ok you're still missing the point. This isn't about C being good or bad or suitable or unsuitable. It's about whether it's good that C has, through no deliberate set of choices, ended up embodying the interface that lets us build rust that can be called by go.

Yes, because C is, by virtue of its history and central role in the development of all mainstream operating systems, the lowest common denominator. Also, if I remember correctly, the first Rust and Go compilers were written in C.

Yes! It's easy to see why we got here, but that doesn't mean it's the optimal outcome!

Re: C isn't a programming language anymore (2022)

#45

None of the alternatives have stability. What was exemplary & idiomatic rust pre-pandemic would be churlish & rejected now and the toolchain use would be different anyway. Carpenters, plumbers, masons & electricians work on houses 3-300 yrs old, navigate the range of legacy styles & tech they encounter, and predictably get good outcomes. Only C has, yet, given use that level of serviceability. C99, baby, why pay more…

> Only C has, yet, given use that level of serviceability. On the contrary, Lisp outshines C to a large degree here. Success has nothing to do with technical merit (if such a thing even exists), it's not a rational game.

What makes you say that?

Re: C isn't a programming language anymore (2022)

#46
post #42
post #38

Earlier quoted context omitted.

Ok you're still missing the point. This isn't about C being good or bad or suitable or unsuitable. It's about whether it's good that C has, through no deliberate set of choices, ended up embodying the interface that lets us build rust that can be called by go.

Yes, because C is, by virtue of its history and central role in the development of all mainstream operating systems, the lowest common denominator. Also, if I remember correctly, the first Rust and Go compilers were written in C.

OCaml was used for rust.

Re: C isn't a programming language anymore (2022)

#47
post #19

I really don't understand why people keep misunderstanding this post so badly. It's not a complaint about C as a programming language. It's a complaint that, due to so much infrastructure being implemented in C, anyone who wants to interact with that infrastructure is forced to deal with some of the constraints of C. C has moved beyond merely being a programming language and become the most common interface for in-pr…

> could things be better if we had an explicitly designed interoperability interface?

Yes, we could define a language-agnostic binary interoperability standard with it's own interface definition language, or IDL. Maybe call it something neutral like the component object model, or just COM[1]. :)

[1] https://en.wikipedia.org/wiki/Component_Object_Model

Re: C isn't a programming language anymore (2022)

#48

Earlier quoted context omitted.

> Only C has, yet, given use that level of serviceability. On the contrary, Lisp outshines C to a large degree here. Success has nothing to do with technical merit (if such a thing even exists), it's not a rational game.

What makes you say that?

Reduce is a Lisp library that's still in active use from 1968, making it older than C itself. We can point to GNU Emacs as an ancient and venerable self-contained Lisp tortoise with more wrinkles than are finitely enumerable, and is in fact a hosted Lisp operating system. Pulling it apart and working with it is admittedly a treat even if I loathe it as a text editor. Mezzano is a modern Lisp OS that you can play with in a VM, and might give you an idea of why Lisp is such a great systems language.

In short: Lisp is semantic and geared towards a living system. The basic REPL is sh + cc + ld + db (and a few others) all in one. It's almost a little mind bending how nice these systems are put together, how cleanly they work. C is like pulling teeth in comparison.

I'm not even a fan of Lisp or sexpr languages. But it's the obvious heavyweight champion of longetivity and ultra-pragmatic service record... Yes, even in the systems domain.

Re: C isn't a programming language anymore (2022)

#49
post #10

[flagged]

This is just an ad hominem attack. Doesn't seem like the author is "in over their head"; they seem to have a pretty solid grasp of actual identifiable gaps between implementations and various specs, and the article was written with the same kind of "chastising" tone as you would see from any grey-bearded hacker who's unsatisfied with the way things are.

Re: C isn't a programming language anymore (2022)

#50
> C was elevated to a role of prestige and power

We didn't do it to annoy you or to foist bad APIs on you. We did it because it was the best language for writing machine code at the time. By miles. Not understanding why this is true will lead you to make all the same mistakes the languages "bested" by C made.

Post reply on HN