[Qt-interest] Non-Virtual Interface Idiom

Piotr Dobrogost pd at qtlists.qt.dobrogost.pl
Sun Dec 19 20:19:02 CET 2010


One of design rules made popular by Herb Sutter is Non-Virtual Interface Idiom explained in the article "Virtuality" in C/C++ Users Journal, 19(9), September 2001 (http://www.gotw.ca/publications/mill18.htm), which can be summarized in the guideline "Prefer to make interfaces nonvirtual, using Template Method."
In many places design of Qt classes does not obey this rule. Is there any rationale for this?


-- 
Piotr Dobrogost

"Break C++ and the major implementations of Java and C# would also break" - Bjarne Stroustrup



More information about the Qt-interest-old mailing list