Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Imagine trying to implement the C preprocessor. I had to write it from scratch 3 times before it worked 100%.


Wow, you are a braver person than I. Well done.


Thank you. I am actually perversely proud of it.


This was back in 80s when you were working on c compilers? That’s an interesting story (80s compiler scene and what you worked on) I’ve picked up bits and pieces over the years, have you written it up anywhere? Would be benefit for many I think.


https://github.com/DigitalMars/dmpp

It's Boost licensed. Open sourced.

No need for anyone else to struggle to implement a preprocessor.


microsoft fixed their broken c preprocessor implementation just a few years ago


They could have just asked me :-)


They were deliberately leaving their C compiler broken because they considered C++ to be the replacement for C.


C++ uses an identical preprocessor.


That has sometimes been true, but for example C++ didn't have variadic macros, maybe still doesn't, because they were added to C after Microsoft decided to stop following C development. https://stackoverflow.com/a/21515839 goes into details of other differences.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: