←back to thread

429 points rui314 | 1 comments | | HN request time: 0s | 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 #
eliben ◴[] No.10735178[source]
What docs? It's all in the standard
replies(1): >>10735443 #
rui314 ◴[] No.10735443[source]
The standard says too little about the preprocessor. I don't think you can implement a preprocessor that can read system header files only with the standard.
replies(1): >>10737730 #
1. eliben ◴[] No.10737730[source]
System header files usually employ platform-specific extensions not only on the preprocessor side, but in preprocessed code as well AFAIK. That is, the compiler has to support them too.

My comment was not to say that coding cpp is easy - just that it's not a particularly hard task compared to the compiler itself.