First Draft: Making printf @safe
IchorDev
zxinsworld at gmail.com
Wed Jul 17 17:45:12 UTC 2024
On Wednesday, 17 July 2024 at 00:42:03 UTC, Walter Bright wrote:
> https://github.com/WalterBright/documents/blob/ed4f1b441e71b5ac5e23a54e7c93e68997981e9a/SafePrintf.md
`printf` always performs pointer arithmetic, and therefore
[should not be marked
`@safe`](https://dlang.org/spec/function.html#safe-functions):
> No pointer arithmetic (including pointer indexing & slicing).
Marking it as `@trusted` is fine, and historically other
`core.stdc` functions that have similar behaviour have also been
marked `@trusted`.
More information about the dip.development
mailing list