<Also on programmers.stack Exchange.com:
I understand that STL concepts had to exist, and that it would be silly to call them "classes" or "interfaces" when in fact they re only documented (human) concepts and couldn t be translated into C++ code at the time, but when given the opportunity to extend the language to accomodate concepts, why didn t they simply modify the capabilities of classes and/or introduced interfaces?
Isn t a concept very similar to an interface (100% abstract class with no data)? By looking at it, it seems to me interfaces only lack support for axioms, but maybe axioms could be introduced into C++ s interfaces (considering an hypothetical adoption of interfaces in C++ to take over concepts), couldn t them? I think even auto concepts could easily be added to such a C++ interface (auto interface LessThanComparable, anyone?).
这一概念是否类似于适应模式? 如果所有方法都行不通,适应者基本上没有时间汇编;汇编者只是将电话换成在线版本,在运行期间直接将目标对象称作接口。
I ve heard of something called Static Object-Oriented Programming, which essentially means effectively reusing the concepts of object-orientation in generic programming, thus permitting usage of most of OOP s power without incurring execution overhead. Why wasn t this idea further considered?
I hope this is clear enough. I can rewrite this if you think I was not; just let me know.