I am sad to see them drop out of the list.
Personally, I like the types that I use to obey a well-known interface, be it primitives, structures, or classes. That way, I know how I can use a type and what I need to implement to provide a type.
This is easily achieved using standard object-oriented programming. However, in my opinion, while technically generalized programming is strongly typed, it loses the concept of an interface that introduces OO. In fact, general programming is similar to dynamic typing, but is allowed in the compiler from an interface point of view.
For example, I pass an iterator to an algorithm that it should provide to some operators, but there is no interface to indicate what these operators should do or what their contracts are (documentation only). If you have operator++() and operator*() , it will be compiled, but it will not give you the same type of guarantee that the interfaces give you OO.
For me, Concepts bring types to general programming, and certainty interfaces bring to OO, the best compiler is just a bonus.
I know that we are all C ++ programmers, and we are very smart, and we read the documentation and understand the overload of operators and the subtleties of general programming. But when a language that provides guarantees that I can rely on and the compiler can test, I can spend more energy on the mind, solving problems that I get paid to solve.
iain Jul 22 '09 at 11:34 2009-07-22 11:34
source share