←back to thread

271 points mithcs | 1 comments | | HN request time: 0.001s | source
Show context
khaledh ◴[] No.45953354[source]
The problem with macro-laden C is that your code becomes foreign and opaque to others. You're building a new mini-language layer on top of the base language that only your codebase uses. This has been my experience with many large C projects: I see tons of macros used all over the place and I have no idea what they do unless I hunt down and understand each one of them.
replies(3): >>45953891 #>>45954270 #>>45954282 #
1. jnwatson ◴[] No.45954270[source]
Like the Linux kernel?

Macros are simply a fact of life in any decent-sized C codebase. The Linux kernel has some good guidance to try to keep it from getting out of hand but it is just something you have to learn to deal with.