DIP1027 + Design by Introspection

Daniel N no at public.email
Tue Feb 2 18:58:02 UTC 2021


On Tuesday, 2 February 2021 at 18:36:30 UTC, 12345swordy wrote:
>
> We don't need more built in attributes to an attribute filled 
> language.
>
> -Alex

Sorry to inform you that this one kinda already exist.
https://dlang.org/spec/pragma.html#printf
Although, I prefer attributes over pragma, as it can be 
introspected.

It's actually a fairly common solution, even gcc has format 
attribute:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
See "format (archetype, string-index, first-to-check)"



More information about the Digitalmars-d mailing list