User Defined Attributes
Johannes Pfau
nospam at example.com
Tue Nov 6 08:04:50 PST 2012
Am Tue, 06 Nov 2012 09:49:42 +0100
schrieb "Jakob Ovrum" <jakobovrum at gmail.com>:
> But, I yield until someone comes up with actual examples of how
> these UDAs are useful, because I can't think of anything
> interesting at the moment. I guess I should go read over the old
> discussions you linked (I remember participating, but can't
> remember any specifics).
>
>
The std.benchmark proposal currently requires all benchmark functions to
be named "benchmark_name":
void benchmark_stdio_write_test() {}
with UDA:
@benchmark("stdio write test") void benchStdioWrite();
Of course you still need that "sheduleBenchmarks" mixin in every module
and of course it'd be nice to avoid that. But UDAs are already a big
step forward.
More information about the Digitalmars-d-announce
mailing list