logoalt Hacker News

lproventoday at 2:08 PM0 repliesview on HN

I knew this about Pike, but not Ritchie. Thanks.

I think, though, that one of the vastly underestimated aspects of Plan 9/9front is its simplified C.

AIUI one of the biggest differences is that a file is not allowed to `#include` anything that has already been #included in a parent project. You are not allowed to nest #includes.

The result is vastly reduced compile times. I have read claims of over 1000x fewer lines of code going through the compiler.

(Sure, disk caching helps a lot, but it still has to go through CPU.)

Cleaning up a codebase is a massive PITA but it's a one-time job and I have read comments that once you learn this, it quickly becomes habit.

Imagine if that was put into C29 as an advisory.

Decades and centuries of compute-time saved.

This is standard in Go, which is of course Pike's more recent baby.

ANSI C let you get away with this, which sounds like one of the more epic mistakes:

https://go.dev/talks/2012/splash.article#TOC_5.