4 ms·
1 is situational, there are good and there are bad macro systems, implicit variable declarations are terrible, but beyond forced typecasting on operators(which
by turndown 6y ago
1 is situational, there are good and there are bad macro systems, implicit variable declarations are terrible, but beyond forced typecasting on operators(which maybe be impossible to avoid) I don't think overloading operators for non-arithmetic types is so bad so long as you're in a language where the types are annotated/easily knowable. If redefining operators is fine in math, I think programmers can manage it too.
- jart 6y ago> there are good and there are bad macro systems Everyone and their grandmother uses the C Preprocessor. However comparatively few people have heard about its cousin m4 which was invented by the same people. m4 never caught on because it isn't very pleasant to use. I'm surprised no one here has mentioned it, since its existence is living proof of just how successful and amazing the C preprocessor is. https://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf https://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf