logoalt Hacker News

imtringued • today at 10:53 AM • 1 reply • view on HN

Looks like AI doesn't have to fall for C hubris. Honestly, if you want to make it in this new AI age I recommend you to question every single thing that is considered set in stone, anything that is considered "the natural order of things" in software development. Think hard outside the box.

I don't know why nobody is seeing the problems with C. From my perspective it's not useful to think of C as a portable assembler or a thin layer on "top of the machine", because it makes C machines look eternal and timeless, even though we are deep into the post C machine era of multi core processors with cache coherence.

>Mainstream programming languages, when compiled for general-purpose CPUs, hide the dependencies between the parts of a program. Any piece of code may read or write any variable through a shared, mutable state, and so modern CPU hardware assumes the worst case and rediscovers, at runtime, which instructions actually depend on each other.

To this day I still wonder why people aren't seeing the immediate glaring red flag that the conventional sequential programming model presents. To this day people keep building inherently sequential languages and then wonder why parallelism is so hard. It's hard because you made a fatal assumption: There is only one global memory. How exactly is anyone supposed to reason about such an omnipotent and all powerful concept, where everything can potentially affect anything? If you have two cores, the entire idea of a singular memory screams like a bottleneck. Like, it's crazy to me that anyone would think in 2026 "yup, lets build another sequential language that makes our lives a living hell".

>Moreover, single-core CPU performance has largely stalled since the early 2000s, pushing people towards large multicore CPUs such as Intel Xeon, AMD Zen, and NVIDIA Vera. This forces CPUs to maintain the illusion that every core sees the same memory, and keeping that illusion consistent and performant requires deep cache hierarchies and coherence protocols that cost area and power, and scale poorly.

Correct. Because everything potentially depends on everything, you need to figure out at runtime when things don't depend on each other, which is kind of insane when you think about it.

The assumption of a single global memory is what doomed C. It's the 21th century. Computers don't have global memories anymore, they pretend they do. You can't fix it. No amount of nostalgia towards C is going to fix this mistake.

Also before someone accuses me of e.g. being a C hater, I'll tell you that Zig's IO Backend parameters are the same type of flaw in Rust that probably will never be fixed. Implicit IO is a different kind of global state that Rust inherited and from the 2026 agentic coding perspective it's a pretty egregious flaw because agents don't care about passing in a parameter, meanwhile from the perspective of PL design, using a parameter instead of a full on effects system has this certain charm / beauty to it, how you don't need to special case everything to get the same results. You just use what is already there.


Replies

actionfromafar • today at 11:00 AM

I'm with you, but I don't see a clear path from "here" (illusion of the same memory) to "there" (each processor has its own memory, I guess). It's really hard to reason about latency, synchronization and communication costs in the abstract.

In a way I see the various cloud computing services as the organically grown (i.e. haphazard and clunky) answer to this problem.