Should trusted pragma(printf) be part of the type system?

Dennis dkorpel at gmail.com
Wed Mar 25 21:51:31 UTC 2026


On Wednesday, 25 March 2026 at 12:54:42 UTC, Nick Treleaven wrote:
> Is there a reliable simple way to fix
> those without changing the design to track this in the type 
> system?

The simple fix is accept that printf does not have a `@safe` 
interface and use a D function instead.

> It could be as simple as the compiler recognizing a new 
> `core.attribute`, so no new language syntax would be needed.

Even that to me sounds like too much effort for an evolutionary 
dead end like pragma(printf).



More information about the Digitalmars-d mailing list