[Qt-interest] Non-Virtual Interface Idiom
Arnold Krille
arnold at arnoldarts.de
Sun Dec 19 23:41:18 CET 2010
Hi,
On Sunday 19 December 2010 20:19:02 Piotr Dobrogost wrote:
> 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?
Lets try this for a rational:
- Who is this guy and why do you think everybody has to follow his "rules"?
- Why is this "rule" contradicting the design patterns of the gang-of-four?
- If virtual functions are not to be used for defining abstract interfaces,
why have them at all?
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101219/bc19fa51/attachment.bin
More information about the Qt-interest-old
mailing list