On Tuesday, 27 October 2015 at 21:14:26 UTC, Timon Gehr wrote:
On 10/27/2015 09:18 PM, tsbockman wrote:
I don't think any dead code is being generated,

This seems to be a misunderstanding. I mean generated using mixins or template instantiation. Sure, it will usually be removed, but why generate and semantically analyze it in the first place.

Forcing me to add `static if`s with redundant and potentially complex predicates just to make my code do the exact same thing it would have done anyway is a violation of "Don't Repeat Yourself", with all of the usual consequences:

* The more places the same logic is expressed, the more chances I have to get it wrong and cause a bug.

* Even if I get it right the first time, a redundant predicate could get out of sync with the rest of the code later, causing a bug.

* It's a waste of my time, which is more valuable than my computer's time.

* It clutters up the code with statements which add little (useful) information.

Reply via email to