Need encouraging...

Walter Bright newshound1 at digitalmars.com
Fri Oct 5 12:48:59 PDT 2007


Don Clugston wrote:
> I think that C++ does make the concept of interfaces difficult to 
> recognize.
> 
> "Since people could put data in the base classes, they sort of felt 
> obliged to do so. " -- Bjarne Stroustrup.
> http://www.artima.com/intv/modern.html

I think that's a very illuminating statement. The way a language is 
designed strongly influences how people think about solving problems 
with it. In C++, and interface class is detectable only as a regular 
looking class with an *absence* of certain members. I don't think it is 
any surprise that it gets nearly completely overlooked.

It's like D's debug statement. Strictly speaking, it's redundant (the 
version statement could do the job instead). But what the debug 
statement does is encourage a particular style of use. That extra bit of 
recognition by the language can make all the difference.



More information about the Digitalmars-d mailing list