News for hackers. Stuff that matters.
Re:The earliest versions of the first C compiler known to exist by mort96 on Monday March 24, 2025 @12:30PM (#43462851)
I would probably describe Perl as really complex to parse as well if I knew enough about it. Both are difficult to parse compared to languages with more "modern sensibilities" like Go and Rust, with their nice mostly context free grammars which can be parsed without terrible lexer hacks and separately from semantic analysis.

Walter Bright (who, among other things, has been employed to work on a C preprocessor) seems to disagree that the C preprocessor is simple to implement: https://news.ycombinator.com/item?id=20890749

> The preprocessor is fiendishly tricky to write. [...] I had to scrap mine and reimplement it 3 times.

I have seen other people in the general "C implementer/standards community" complain about it as well.

Re:The earliest versions of the first C compiler known to exist by pjc50 on Monday March 24, 2025 @12:44PM (#43462960)
I wonder if we can dig out the original K&R preprocessor implementation?
Re:The earliest versions of the first C compiler known to exist by dbrower on Monday March 24, 2025 @01:05PM (#43463147)
it was a lot simpler in capabilities. much of the complexity is because of feature creep.
Re:The earliest versions of the first C compiler known to exist by uecker on Tuesday March 25, 2025 @04:06AM (#43468953)
What feature creep did the preprocessor have?