opEquals and the Non-Virtual Interface idiom

grauzone none at example.net
Sun Sep 27 13:42:31 PDT 2009


Andrei Alexandrescu wrote:
> Do you know of a precedent for this? One thing that NVI has going for it 
> is that it's quite established - it seems to be solidly planted in 
> programmers' lore. I was surprised to find 2.8M Google matches for the 
> exact string "Non-Virtual Interface".

Looks like it's considered a design pattern, and design patterns are 
popular. I think the idea itself is relatively obvious and useful, so 
it's likely to encounter it often. (I didn't even know it's called "NVI".)

By the way, Aspect Oriented Programming also seems to reinvent this idea 
with pre/post code for methods (see Yigal's posting).



More information about the Digitalmars-d mailing list