Re: CT/RT annoyance

2019-06-17 Thread user1234--- via Digitalmars-d-learn
On Monday, 17 June 2019 at 05:04:50 UTC, Bart wrote: Consider void foo(string A = "")(string B = "") { static if (A != "") do(A); else do(B); } [...] I see the annoyance but D clearly separates what is CT and RT so such a change would require a DIP. I don't even know

CT/RT annoyance

2019-06-16 Thread Bart via Digitalmars-d-learn
Consider void foo(string A = "")(string B = "") { static if (A != "") do(A); else do(B); } foo!("x"); foo("x"); This is necessary because D's templating and meta programming system is frail. While CTFE should take care of such things, it does not, consider