> 那么 Andrei Alexandrescu 展示的设计模式和经典的设计模式有什么不同呢?
the same. conventionally, people believe that design patterns are pure abstract thingies (souls) that cannot be demonstrated without concrete examples (bodies), iow, they can't be codedly expressed without examples. andrei shows you can... with c++ templates.
在 Modern C++ Design 一书中,Andrei Alexandrescu 通过 Generic programming using templates 演绎了一些经典的设计模式。这种新的思想别有风味,甚至不易被人接受。我相信这本书的动机肯定不是为了证明“OO能做到的GP也能做到”,那样就太无聊了。那么 Andrei Alexandrescu 展示的设计模式和经典的设计模式有什么不同呢?