C#'s greatest mistakes

"Jérôme M. Berger" jeberger at free.fr
Mon Nov 29 14:37:18 PST 2010


Jonathan M Davis wrote:
> On Sunday, November 28, 2010 04:43:47 Jérôme M. Berger wrote:
>> ==============================8<------------------------------
>> concept FooBar(U)
>> {
>>    int  foo (int);
>>    bool bar (U);
>> }
>>
>> template Test(T, U) if (is!(FooBar!U, T)) ...
>> ------------------------------>8==============================
>>
>> 	This already works with class and interface templates...
> 
> That may work. I was thinking of a verifying against a concrete interface - 
> which _wouldn't_ work with templates. I probably didn't think of this because 
> mixing templates and interfaces or classes is generally a bad idea in D, because 
> template functions can't be virtual.
> 
	That is why I used the word "concept" instead of "interface". What
I describe here has *nothing* to do with interfaces as they
currently exist in D (although a library solution could be done
using interfaces if nothing else is done).

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101129/29027cfa/attachment.pgp>


More information about the Digitalmars-d mailing list