3 ms·
Out of curiosity - why do you consider cpp particularly hard? It's easier than the compiler, actually :)
by eliben 11y ago
Out of curiosity - why do you consider cpp particularly hard? It's easier than the compiler, actually :)
- tomcam 11y agoWell... 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.
- eliben 11y agoWhat docs? It's all in the standard
- rui314 11y agoThe 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.
- eliben 11y agoSystem 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.
- DougMerritt 11y agoThere 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.