Protocols vs Concepts?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Nov 21 11:30:00 PST 2013


On 11/21/13 10:45 AM, Jacob Carlborg wrote:
> On 2013-11-21 17:02, Andrei Alexandrescu wrote:
>
>> Interfaces can't check for a variety of things that Boolean conditions
>> can (isInfinite comes to mind).
>
> Why wouldn't you be able to put the implementation of isInfinite in an
> interface?

It's a value, not a type.

Walter and I went a couple of times over the idea of using interfaces 
for concept conformance during the early days, and figured general 
Boolean logic is more powerful for expressing constraints.


Andrei




More information about the Digitalmars-d mailing list