←back to thread

429 points rui314 | 1 comments | | HN request time: 0.001s | source
Show context
tomcam ◴[] No.10731290[source]
I was a little surprised that the author was able to manage both C11 and the preprocessor in that time. The preprocessor is hard. But there was existing code from a previous version of it, which makes sense. Still, a fantastic achievement! Congrats to the author!
replies(1): >>10732574 #
eliben ◴[] No.10732574[source]
Out of curiosity - why do you consider cpp particularly hard? It's easier than the compiler, actually :)
replies(1): >>10734688 #
tomcam ◴[] No.10734688[source]
Well... easier than the compiler but very hard to do the last 20% (I never had the time; hobby project) because docs are so hard to find. Or at least were--maybe that's changed.
replies(2): >>10735178 #>>10735830 #
1. DougMerritt ◴[] No.10735830[source]
There are lots of corner cases that people are unaware of, such that almost all reinventions of the C preprocessor are technically broken, but in ways that typically won't be noticed.

One of the primary authors of the standard posted a corner case where the standard was wrong, and one needed his posting to design one piece of the preprocessor correctly.

Generally when people say "why do you say XYZ is hard? I did it and it was easy!" -- they haven't put their creation into industrial use with millions of users, and hence are unaware of its flaws.

As you say, just doing the metaphorical 80% of most things is indeed easy, but not the remainder.