M
Mike Malone
A colleague of mine is proposing that we use a set of preprocessor
definitions to make our C code more readable:
#define BEGIN {
#define ENG }
#define EQ ==
etc.
My initial reaction is "Yuck!" (Not too different from the FAQ, which just
says "Bleah").
Aside from that, what are some good reasons to do this, or not to do this?
A few negatives I come up with include:
* Won't work with some tools, such as
- syntax-aware editors
- metrics
- static analysis tools
- coding style enforcement
- code indenters/reformatters
- pretty printers
* Does not check for mismatches (e.g., "{" vs. "END").
* Does not prevent use of {, }, ==, etc., just adds alternatives.
* Requires re-training of C developers who are used to standard C syntax.
definitions to make our C code more readable:
#define BEGIN {
#define ENG }
#define EQ ==
etc.
My initial reaction is "Yuck!" (Not too different from the FAQ, which just
says "Bleah").
Aside from that, what are some good reasons to do this, or not to do this?
A few negatives I come up with include:
* Won't work with some tools, such as
- syntax-aware editors
- metrics
- static analysis tools
- coding style enforcement
- code indenters/reformatters
- pretty printers
* Does not check for mismatches (e.g., "{" vs. "END").
* Does not prevent use of {, }, ==, etc., just adds alternatives.
* Requires re-training of C developers who are used to standard C syntax.