WalterBright is the mantainer of the D language, so I guess he sees everithing from the point of view of the compiler.
I wrote a lot of code for the optimization step of the compiler of Racket, in particular steps to eliminate similar code. I saw those expressions and I inmediately think:
Macro expansions create a lot of similar expressions, and also more complex expressions that the compiler can reduce to trivialy looking expressions [1]. It's nice that the compiler can detect them and eliminate them, but raisng an error would break a lot of code.
My guess is that all three of us agree that the post is about linters, but it would be very bad to extend this rule to the compiler.
[1] For example, after an expansion of a macro or inlining a function you may get:
(define x (random 10))
(if (integer? x)
(display x)
(error "The number should be an integer"))
I wrote a lot of code for the optimization step of the compiler of Racket, in particular steps to eliminate similar code. I saw those expressions and I inmediately think:
Macro expansions create a lot of similar expressions, and also more complex expressions that the compiler can reduce to trivialy looking expressions [1]. It's nice that the compiler can detect them and eliminate them, but raisng an error would break a lot of code.
My guess is that all three of us agree that the post is about linters, but it would be very bad to extend this rule to the compiler.
[1] For example, after an expansion of a macro or inlining a function you may get: