Hacker News new | ask | show | jobs
by pjmlp 1823 days ago
The cargo cult goes beyond that.

The belief it was created alongside UNIX from the start, when it was used to port UNIX V4 into high level language.

Micro-optimizing each line of code as it is written, "because it is fast", without even bothering to use a profiler.

Even though lint was created alongside C to fix already known programmer faults using the language, in 1979, the belief that only bad programmers need such kind of tooling.

2 comments

> Micro-optimizing each line of code as it is written, "because it is fast", without even bothering to use a profiler.

With the CPU, MMU and OS architectures of that period, it wasn't particularly hard to infer what was fast without profiling it. The slow rise in complexity at all 3 levels now makes it hard for even extremely experienced close-to-the-metal programmers to understand what will be fast or slow without a profiler. Times do change, in fact.

Yeah, except the world has moved on from PDP-11, no need to keep asserting something that isn't no longer true.
No, the problem on unix v4 (at least I think that's the version I'm talking about) was that the C compiler did not support passing structs - whether as arguments, return values, or any other expression. So, they didn't do that, because it wouldn't work, and it was less hassle to work around it than fix the compiler. The cargo cult is when people keep avoiding struct passing, even though that compiler deficiency has been fixed for decades now.
That isn't what I was talking about, rather that C only appeared on season 4 of the UNIX movie, when many think it was part of the original cast from the get go.

So it gets a cargo cult status like UNIX was only possible because C was designed to make it happen and other bogus pocus that ignores almost 15 years of previous work in high level languages for systems programming.

> rather that C only appeared on season 4 of the UNIX movie, when many think it was part of the original cast from the get go.

Ah, that makes sense, but that's a different cargo cult than Gibbon1 was complaining about.

Hence why I started my reply to Gibbon1 with "The cargo cult goes beyond that.".