Reminds me of an intro to programming book in German that I once had, covering different styles from imperative to OO. Not even that old, late 90s I guess. But I guess the author just had to use C, even if he'd have preferred Pascal. So the very first thing the book does is introduce a boatload of preprocessor macros to make it look like Pascal. A weird way to start out if you had some prior C experience…
Then again, for short academic programs it probably won't cause that much confusion, having running code is more a side-effect of that, so it's a bit like executable pseudocode.
It does make me wonder what's the biggest program out there that's been written with heavy preprocessor abuse. Then again, not sure whether I'd really wanna know…
Then again, for short academic programs it probably won't cause that much confusion, having running code is more a side-effect of that, so it's a bit like executable pseudocode.
It does make me wonder what's the biggest program out there that's been written with heavy preprocessor abuse. Then again, not sure whether I'd really wanna know…