obsolete D libraries/modules

Jacob Carlborg doob at me.com
Tue Sep 3 12:08:35 PDT 2013


On 2013-09-03 21:00, Andrej Mitrovic wrote:

> Ah, maybe @doc("count", "This is the thread count") ? Then you could
> inject it at any place. There's lots of playground here with UDAs.

I don't like that idea to have to repeat the name of the flag. But maybe 
that's only needed if you want to place the help string anywhere.

I'm just thinking out loud here. An idea that would make it more 
readable. Currently this is supported:

struct Foo
{
     int bar;
}

Foo foo = { bar: 3 };

But this doesn't work:

void foo (Foo foo);

foo({ bar: 3 ));

If that worked we could possibly have an API like this:

int count;

getop(
     { name: "count", value: &bool, doc: "This is the thread count" )
);

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list