Live data from Hacker News

C isn't a programming language anymore (2022)

faultlore.com

51–60 of 217 posts

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

#51

Earlier quoted context omitted.

What is TFA?

The Fine/Fabulous/Fucking Article Choose your own adjective

To further explain: it comes from 'RTFA' https://en.wiktionary.org/wiki/RTFA which was developed on Slashdot as a variation on 'RTFM'.

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

#52
post #31

Earlier quoted context omitted.

> why C gets to be the foundation for how systems software is written. Is there an answer here more interesting than "it's what Unix and Windows were written in, so that's how programs talked to the OS, and once you have an interface, it's impossible to change"?

Yes and no. Clearly what you said is true, but the more profound reason is that C just minimally reflects how computers work. The rest is just convention.

It minimally reflects PDP-11 assembly, which is not how modern computers work.

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

#53
post #6

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…

The replacement has already happened. It is HTTP and JSON for 99% of the software developed today. The reason C stayed has multiple reasons but most obvious ones are for me are: - People just stopped caring about operating systems research and systems programming after ~2005. Actual engineering implementations of the concepts largely stopped after the second half of 90s. Most developers moved on to making websites or…

> People just stopped caring about operating systems research and systems programming after ~2005.

and so it was that after that date, all development of

   embedded systems
   kernel drivers
   digital audio workstations
   video editors
   codecs for audio and video
   anything that involved actually controlling non-computer hardware
   game engines
came to a grinding halt, and no further work was done.

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

#54

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…

FWIW, the crabi project within rust is trying to improve on some parts of it. But it is still built on (a subset of) the environments c ABI. And it doesn't fix all the problems.

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

#55
It's not that it was made this way to annoy you, it was all we had.

The whole world shouldn't "need to be fixed" because you won't spend the time to learn something.

Rust doesn't even have a stable Internal ABI that's why you have to re-compile everything all the time.

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

#56

What languages does this author like which has a written spec?

This article isn't about languages. It's about the protocol for two or more languages to talk to each other. There is no specification for this.

The System V ABI is as close as we get to an actual specification but not everyone uses it and in any case it only covers a small part of the protocol.

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

#57
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, because C is, by virtue of its history

Sure history is great and all, but in C it's hard to say reliably define this int is 64-bit wide, because of the wobbly type system. Plus, the whole historical baggage of not having 128-bit wide ints. Or sane strings (not null terminated).

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

#58
The trouble with C as an API format is that there's no size info. That's asking for buffer overflows.

There's an argument for full type info at an API, but that gets complicated across languages. Things that do that degenerate into CORBA. Size info, though, is meaningful at the machine level, and ought to be there.

Apple originally had Pascal APIs for the Mac, which did carry along size info. But they caved and went with C APIs.

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

#59
> Anyone who spends much time trying to parse C(++) headers very quickly says “ah, actually, fuck that” and asks a C(++) compiler to do it.

That's exactly my case. For my programming language I have wrote a tool for C headers conversion using libclang. And even with help of this library it wasn't that easy, I have found a lot of caveats by trying converting headers like .

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

#60
post #31

Earlier quoted context omitted.

> why C gets to be the foundation for how systems software is written. Is there an answer here more interesting than "it's what Unix and Windows were written in, so that's how programs talked to the OS, and once you have an interface, it's impossible to change"?

Yes and no. Clearly what you said is true, but the more profound reason is that C just minimally reflects how computers work. The rest is just convention.

> C just minimally reflects how computers work. The rest is just convention.

This hasn't been true for decades. x86 assembly is now itself an abstraction over what the CPU is actually doing.

Microcode, speculative execution, etc.

Post reply on HN