
On 28/09/10 18:33, David Abrahams wrote:
At Tue, 28 Sep 2010 10:00:54 -0500, Andrew Sutton wrote:
It seems to me that writing constraints in terms of valid expressions gives you flexibility when you want it, but doesn't preclude the strengthening of requirements when needed.
It's not that there's anything you *can't* express with valid expressions, it's that they're difficult to use correctly, and the most natural way of using them creates a big mess for algorithm writers. Furthermore, they don't offer any compelling value over the alternative.
Please demonstrate how you check that a type models a concept without using a set of valid expressions to define the concept, but only with signatures in an archetype-like fashion. My insight is that you can't. Therefore what compelling value expressions give over archetypes becomes fairly obvious: they do what we want, while archetypes don't and do something different. You said it yourself: expressions are only half the solution; archetypes are the other half. They're not the whole and they're no substitute for using expressions to define and test concepts.