On Sunday, 3 March 2013 at 11:08:33 UTC, Dicebot wrote:
On Sunday, 3 March 2013 at 11:03:55 UTC, deadalnix wrote:
On Sunday, 3 March 2013 at 10:47:34 UTC, Dicebot wrote:
Regarding CTFE - it is a reason to not use this layout for generic algorithm libraries and similar stuff, but there is no point in allowing application module code for CTFE by an accident.

It is the virtual vs final by default argument. You'll find very good reason to do so, but it has drawback. I'm not sure if one is really better than the other.

How so? virtual vs final is a lot about overriding by accident (or not overriding), VMT overhead and similar things that do make difference. CTFE is all about either giving access to source for evaluation or not. Where is the catch?

That is the same debate with the same argument.

People that argue for final by default say that you can still make the function virtual afterward if needed, when the people arguing the other way around say that you may not know in advance what will be overloaded, and that you create unnecessary restriction.

CTFEability is exactly the same argument.

Overriding by accident is not a concern as you have to specify override anyway.

Reply via email to