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

There's an obvious solution to this: have friendly-c compilers accept some declaration silently in a source file:

  !dialect friendly-c
Now, c code can compile as friendly-c code, but explicitly-declared friendly-c code will fail if passed to a normal C compiler.


Such code would also fail if passed to tools like lint, and would result in warnings or worse when loaded in IDEs. The incredible C toolchain built over the decades is one of C's biggest advantages; friendly-c cannot afford to lose even 10% of it.


So make it a #pragma.


Then it cannot cause a compile error in standard C.




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

Search: