On 3/16/12 7:45 PM, Daniel Murphy wrote:
You can do that just as well without using an 'else' block.version(ThisOS) { doItThisWay(); } else version(ThatOS) { doItThatWay(); } else version(SomeOS) { doItSlowWay(); } else version(OtherOS) { doItSlowWay(); } else static assert(0, "OS not implemented");
But why duplicate doItSlowWay(); which may be an arbitrarily long sequence? This seems to accomplish little more than "well I didn't use else". Again: what exactly is wrong with specialization? Andrei
