Does D have too many features?

Alex Rønne Petersen xtzgzorex at gmail.com
Sun Apr 29 20:41:23 PDT 2012


On 30-04-2012 05:34, Jonathan M Davis wrote:
> On Monday, April 30, 2012 05:20:21 Alex Rønne Petersen wrote:
>> Except we can't do:
>>
>> @test
>> void myTest()
>> {
>>       // ...
>> }
>>
>> due to the current lack of annotations and discovery-based reflection. ;)
>>
>> *hint hint...*
>
> What would that buy you? That's what unittest blocks are for. Yes, getting
> custom annotations would be great, and then you could use @test for whatever
> you need it for, but unittest blocks are the test functions, so I'm not quite
> sure what @test would buy you. You _could_ just put a particular string in a
> name though (e.g. start all unit test functions with test) and use compile-
> time reflection to find them if you really want to though (much as that isn't as
> nice as a user-defined attribute would be).
>
> - Jonathan M Davis

See my other reply to H. S. Teoh for why I'm not a fan of unittest blocks.

-- 
- Alex


More information about the Digitalmars-d mailing list