What are the worst parts of D?

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 25 23:51:38 PDT 2014


On Thursday, 25 September 2014 at 17:45:56 UTC, Andrei 
Alexandrescu wrote:
> On 9/25/14, 10:26 AM, Atila Neves wrote:
>> On Thursday, 25 September 2014 at 13:50:10 UTC, Jacob Carlborg 
>> wrote:
>>> On 25/09/14 09:38, Atila Neves wrote:
>>>
>>>> Here's one: having to manually generate the custom main file 
>>>> for
>>>> unittest builds. There's no current way (or at least there 
>>>> wasn't when I
>>>> brought it up in the dub forum) to tell it to autogenerate a 
>>>> D file from
>>>> a dub package and list it as a dependency of the unittest 
>>>> build.
>>>
>>> Hmm, I haven't used Dub to run unit tests. Although, DMD has 
>>> a "-main"
>>> flag that adds an empty main function.
>>
>> I don't want an empty main function. I want the main function 
>> and the
>> file it's in to be generated by the build system.
>
> Why would be the focus on the mechanism instead of the needed 
> outcome? -- Andrei

Because I don't use unittest blocks, I use my own library. The 
one thing it can't use the compiler for is discover what files 
are in a directory, so I need to generate the main function that 
calls into unit-threaded with a list of compile-time strings. 
What I need/want is that every time I add a new source file to 
the project, it gets auto-generated automatically and is a 
dependency of the unittest build in dub.

Atila




More information about the Digitalmars-d mailing list