concepts and interfaces

Neal Becker ndbecker2 at gmail.com
Wed Apr 11 05:32:07 PDT 2007


Don Clugston wrote:

> James Dennett wrote:
>> Craig Black wrote:
>>> This may sound a little retarded, but wouldn't making concepts
>>> obligatory
>>> make generic programming more complex and hence more difficult?  In my
>>> opinion this may do more harm than good.  A huge appeal of generic stuff
>>> in
>>> D is that it's easier to work with than the C++ stuff.  More powerful,
>>> yes,
>>> but also easier.  IMO this is very important.
>> 
>> Concepts appear to make generic programming simpler and
>> hence easier, with more meaningful diagnostics.
> 
> But I think Craig's point is valid (and interesting) -- concepts will
> have a huge benefit for complicated C++ template code, but since D
> templates are easier to work with already (and we have static
> if/is/static assert), in D, concepts are at a totally different point on
> the cost-benefit curve. Are they still worthwhile?

What would D do to replace concept mapping?  That seems to me to be the most
interesting part of c++ concepts.



More information about the Digitalmars-d mailing list